From patchwork Thu Nov 29 04:28:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005048 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354ct71wMz9s47 for ; Thu, 29 Nov 2018 15:42:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354ct5RfzzDqN9 for ; Thu, 29 Nov 2018 15:42:22 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K81wd3zDr3N for ; Thu, 29 Nov 2018 15:28:43 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4OBjd047218 for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from e13.ny.us.ibm.com (e13.ny.us.ibm.com [129.33.205.203]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p287khu3d-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from localhost by e13.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:40 -0000 Received: from b01cxnp23032.gho.pok.ibm.com (9.57.198.27) by e13.ny.us.ibm.com (146.89.104.200) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:38 -0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp23032.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sb7v19267686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:37 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 74C17112066 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 33EB8112063 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id A166D4EC6AC; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:26 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0064-0000-0000-0000037D0DDB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583712; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0065-0000-0000-00003B7EB7A6 Message-Id: <20181129042833.27376-2-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 1/8] core/cpu.c: avoid container_of(NULL) in next_cpu() X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" A certain finicky static analysis tool did point out that we were operating on a value that could be null (and since first_cpu() calls next_cpu(NULL) to get the first one, it also gets to be complained about as next_cpu() could act on that NULL pointer). So, rework things to shut the static analysis tool up, when in fact this was never a problem. Signed-off-by: Stewart Smith --- core/cpu.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/core/cpu.c b/core/cpu.c index 4f518a4c10b2..a83f8baf1031 100644 --- a/core/cpu.c +++ b/core/cpu.c @@ -739,13 +739,13 @@ struct cpu_thread *find_cpu_by_server(u32 server_no) struct cpu_thread *next_cpu(struct cpu_thread *cpu) { - struct cpu_stack *s = container_of(cpu, struct cpu_stack, cpu); - unsigned int index; + struct cpu_stack *s; + unsigned int index = 0; - if (cpu == NULL) - index = 0; - else + if (cpu != NULL) { + s = container_of(cpu, struct cpu_stack, cpu); index = s - cpu_stacks + 1; + } for (; index <= cpu_max_pir; index++) { cpu = &cpu_stacks[index].cpu; if (cpu->state != cpu_state_no_cpu) From patchwork Thu Nov 29 04:28:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354f73BFDz9s47 for ; Thu, 29 Nov 2018 15:43:27 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354f71XR6zDqXg for ; Thu, 29 Nov 2018 15:43:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K86kNWzDr22 for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4OG96113184 for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from e12.ny.us.ibm.com (e12.ny.us.ibm.com [129.33.205.202]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p25fcfxcw-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from localhost by e12.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e12.ny.us.ibm.com (146.89.104.199) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:38 -0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sbr416580786 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:37 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7C318AE068 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3B75DAE063 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id AD47B4EC5DF; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:27 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0060-0000-0000-000002DB2E9D X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583712; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0061-0000-0000-0000475B77AD Message-Id: <20181129042833.27376-3-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 2/8] Change ifdef around dump_fdt() to shut up static analysis X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" This is a dumb warning from a certain static analysis tool that a function has no effect when the ifdef that would make it have an effect isn't defined and we replace it with a no-op impl. Putting the #ifdef around the call just so I don't have to discount this damn static analysis false positive every time I go and look at the results. Signed-off-by: Stewart Smith --- core/fdt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/fdt.c b/core/fdt.c index 8fb9ad726548..ce4f66380a63 100644 --- a/core/fdt.c +++ b/core/fdt.c @@ -108,8 +108,6 @@ static void dump_fdt(void *fdt) prlog(PR_INFO, "name: %s [%u]\n", name, off); } } -#else -static inline void dump_fdt(void *fdt __unused) { } #endif static void flatten_dt_properties(void *fdt, const struct dt_node *dn) @@ -183,7 +181,9 @@ static int __create_dtb(void *fdt, size_t len, return fdt_error; } +#ifdef DEBUG_FDT dump_fdt(fdt); +#endif return 0; } From patchwork Thu Nov 29 04:28:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005051 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354dp5pPsz9s47 for ; Thu, 29 Nov 2018 15:43:10 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354dp4RR2zDqSx for ; Thu, 29 Nov 2018 15:43:10 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K864j8zDr3Y for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4OAXg112853 for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from e14.ny.us.ibm.com (e14.ny.us.ibm.com [129.33.205.204]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p25fcfxcy-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from localhost by e14.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b01cxnp23033.gho.pok.ibm.com (9.57.198.28) by e14.ny.us.ibm.com (146.89.104.201) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:38 -0000 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp23033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sbcg16384146 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:37 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 85D1A2805A for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 44C9028060 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id AECD84EC5F6; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:28 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0052-0000-0000-0000035DF957 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583713; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0053-0000-0000-00005EEC422D Message-Id: <20181129042833.27376-4-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 3/8] mem_region.c: Move ifdef for MEM_POISON to shut up static analysis X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" The static analysis tool is arguably wrong and should go away. But... I'm sick of keeping coming back to it and reviewing the false positives enough to make a slight change to where ifdefs are. Signed-off-by: Stewart Smith --- core/mem_region.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/mem_region.c b/core/mem_region.c index 7aac4e1c4f6a..74551922b1be 100644 --- a/core/mem_region.c +++ b/core/mem_region.c @@ -162,8 +162,6 @@ static void mem_poison(struct free_hdr *f) memset(f+1, POISON_MEM_REGION_WITH, poison_size); } -#else -static inline void mem_poison(struct free_hdr *f __unused) { } #endif /* Creates free block covering entire region. */ @@ -178,7 +176,9 @@ static void init_allocatable_region(struct mem_region *region) *tailer(f) = f->hdr.num_longs; list_head_init(®ion->free_list); list_add(®ion->free_list, &f->list); +#if POISON_MEM_REGION == 1 mem_poison(f); +#endif } static void make_free(struct mem_region *region, struct free_hdr *f, @@ -186,8 +186,12 @@ static void make_free(struct mem_region *region, struct free_hdr *f, { struct alloc_hdr *next; +#if POISON_MEM_REGION == 1 if (!skip_poison) mem_poison(f); +#else + (void)skip_poison; +#endif if (f->hdr.prev_free) { struct free_hdr *prev; From patchwork Thu Nov 29 04:28:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005047 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354cZ6pvgz9s47 for ; Thu, 29 Nov 2018 15:42:06 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354cZ5PHczDr3Z for ; Thu, 29 Nov 2018 15:42:06 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K80nSnzDr3B for ; Thu, 29 Nov 2018 15:28:43 +1100 (AEDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4Oa4l017061 for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p24kksbyc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:40 -0000 Received: from b03cxnp08027.gho.boulder.ibm.com (9.17.130.19) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:38 -0000 Received: from b03ledav005.gho.boulder.ibm.com (b03ledav005.gho.boulder.ibm.com [9.17.130.236]) by b03cxnp08027.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sbxr27394292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:37 GMT Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 78D61BE054 for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from b03ledav005.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 41DB9BE04F for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b03ledav005.gho.boulder.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:37 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id B4D184EC5FF; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:29 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0016-0000-0000-0000095C8DFA X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583712; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:39 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0017-0000-0000-00004139EC5A Message-Id: <20181129042833.27376-5-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 4/8] opal_trace_entry: Move ifdef around to shut up static analysis X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Again, this makes things look slightly different so I don't keep seeing the static analysis warning. Signed-off-by: Stewart Smith --- core/opal.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/opal.c b/core/opal.c index 3a8ea30b79f0..ba30c309ca58 100644 --- a/core/opal.c +++ b/core/opal.c @@ -93,9 +93,9 @@ long opal_bad_token(uint64_t token) return OPAL_PARAMETER; } +#ifdef OPAL_TRACE_ENTRY static void opal_trace_entry(struct stack_frame *eframe __unused) { -#ifdef OPAL_TRACE_ENTRY union trace t; unsigned nargs, i; @@ -111,8 +111,8 @@ static void opal_trace_entry(struct stack_frame *eframe __unused) t.opal.r3_to_11[i] = cpu_to_be64(eframe->gpr[3+i]); trace_add(&t, TRACE_OPAL, offsetof(struct trace_opal, r3_to_11[nargs])); -#endif } +#endif /* * opal_quiesce_state is used as a lock. Don't use an actual lock to avoid @@ -138,7 +138,9 @@ int64_t opal_entry_check(struct stack_frame *eframe) abort(); } +#ifdef OPAL_TRACE_ENTRY opal_trace_entry(eframe); +#endif if (!opal_check_token(token)) return opal_bad_token(token); From patchwork Thu Nov 29 04:28:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005049 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354dC0ntfz9s47 for ; Thu, 29 Nov 2018 15:42:39 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354dB6csfzDqXg for ; Thu, 29 Nov 2018 15:42:38 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K83XqwzDr3S for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4OAAa027234 for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p26q8w5km-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:41 -0500 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b03cxnp08026.gho.boulder.ibm.com (9.17.130.18) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:39 -0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08026.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Scwj18481268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:38 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CFFC57805F for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 983347805C for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id BABB14EC914; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:30 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0016-0000-0000-0000095C8DFB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583712; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0017-0000-0000-00004139EC5D Message-Id: <20181129042833.27376-6-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 5/8] opal_sync_host_reboot: clarify when we return OPAL_BUSY_EVENT X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Basically to shut up static analysis of using a boolean in a non-boolean context (bitwise). Signed-off-by: Stewart Smith --- core/opal.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/core/opal.c b/core/opal.c index ba30c309ca58..46035e836087 100644 --- a/core/opal.c +++ b/core/opal.c @@ -704,14 +704,12 @@ void opal_del_host_sync_notifier(bool (*notify)(void *data)) static int64_t opal_sync_host_reboot(void) { struct opal_sync_entry *ent, *nxt; - bool ret = true; + int ret = OPAL_SUCCESS; list_for_each_safe(&opal_syncers, ent, nxt, link) - ret &= ent->notify(ent->data); + if (! ent->notify(ent->data)) + ret = OPAL_BUSY_EVENT; - if (ret) - return OPAL_SUCCESS; - else - return OPAL_BUSY_EVENT; + return ret; } opal_call(OPAL_SYNC_HOST_REBOOT, opal_sync_host_reboot, 0); From patchwork Thu Nov 29 04:28:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005054 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354fn1vvZz9sDF for ; Thu, 29 Nov 2018 15:44:01 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354fn0LQ3zDr4t for ; Thu, 29 Nov 2018 15:44:01 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.156.1; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354KB64dpzDr24 for ; Thu, 29 Nov 2018 15:28:46 +1100 (AEDT) Received: from pps.filterd (m0098394.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4O9Rv008165 for ; Wed, 28 Nov 2018 23:28:45 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p28gd1db8-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:44 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:43 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:40 -0000 Received: from b01ledav006.gho.pok.ibm.com (b01ledav006.gho.pok.ibm.com [9.57.199.111]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4SdHf18219138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:39 GMT Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 147B0AC060 for ; Thu, 29 Nov 2018 04:28:39 +0000 (GMT) Received: from b01ledav006.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C772DAC05B for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav006.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id C07B84EC930; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:31 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0040-0000-0000-0000049A1CD0 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00577119; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:41 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0041-0000-0000-000008A33352 Message-Id: <20181129042833.27376-7-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 6/8] vpd: Force static analysis to not think about NULL term strings X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Signed-off-by: Stewart Smith --- core/vpd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/vpd.c b/core/vpd.c index 377c9192cce0..94b7b7aa9961 100644 --- a/core/vpd.c +++ b/core/vpd.c @@ -204,7 +204,7 @@ static void *vpd_lid_preload(const uint8_t *lx) void vpd_iohub_load(struct dt_node *hub_node) { - char record[4] = "LXR0"; + uint8_t record[4] = { 'L','X','R','0' }; /* not null terminated */ const void *valid_lx; uint8_t lx_size; int r; From patchwork Thu Nov 29 04:28:32 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005050 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354dW2zndz9s47 for ; Thu, 29 Nov 2018 15:42:55 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354dW1NmDzDqnZ for ; Thu, 29 Nov 2018 15:42:55 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K83Cy5zDr3Q for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4O9PB047132 for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from e15.ny.us.ibm.com (e15.ny.us.ibm.com [129.33.205.205]) by mx0a-001b2d01.pphosted.com with ESMTP id 2p287khu3m-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from localhost by e15.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b01cxnp22034.gho.pok.ibm.com (9.57.198.24) by e15.ny.us.ibm.com (146.89.104.202) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:40 -0000 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22034.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4SdnL16449550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:39 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 157BA12405B for ; Thu, 29 Nov 2018 04:28:39 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D20E9124053 for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id C6E2F4EC93D; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:32 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0068-0000-0000-00000368C6AB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00583713; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0069-0000-0000-00004695C4D8 Message-Id: <20181129042833.27376-8-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 7/8] hdata/iohub.c: remove condition that was always true X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Caught by static analysis. The previous if() condition was ensuring lxr was not null, so we don't need this additional check. Signed-off-by: Stewart Smith --- hdata/iohub.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/hdata/iohub.c b/hdata/iohub.c index f37f5abf31c8..e16fb0b4e3fd 100644 --- a/hdata/iohub.c +++ b/hdata/iohub.c @@ -82,8 +82,7 @@ static bool io_get_lx_info(const void *kwvpd, unsigned int kwvpd_sz, return false; } - if (lxr) - memcpy(lxrbuf, lxr, sizeof(uint32_t)*2); + memcpy(lxrbuf, lxr, sizeof(uint32_t)*2); prlog(PR_DEBUG, "CEC: LXRn=%d LXR=%08x%08x\n", lx_idx, lxrbuf[0], lxrbuf[1]); prlog(PR_DEBUG, "CEC: LX Info added to %llx\n", (long long)hn); From patchwork Thu Nov 29 04:28:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stewart Smith X-Patchwork-Id: 1005053 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4354fR0qBmz9s4s for ; Thu, 29 Nov 2018 15:43:43 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 4354fQ6JSDzDqVZ for ; Thu, 29 Nov 2018 15:43:42 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=stewart@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4354K91GKvzDr28 for ; Thu, 29 Nov 2018 15:28:44 +1100 (AEDT) Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAT4ObJn017143 for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0b-001b2d01.pphosted.com with ESMTP id 2p24kksbyq-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 28 Nov 2018 23:28:42 -0500 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 29 Nov 2018 04:28:41 -0000 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Thu, 29 Nov 2018 04:28:40 -0000 Received: from b01ledav004.gho.pok.ibm.com (b01ledav004.gho.pok.ibm.com [9.57.199.109]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAT4Sdvb19005608 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 29 Nov 2018 04:28:39 GMT Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 16EC0112063 for ; Thu, 29 Nov 2018 04:28:39 +0000 (GMT) Received: from b01ledav004.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D4A8A112061 for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: from birb.localdomain (unknown [9.185.142.67]) by b01ledav004.gho.pok.ibm.com (Postfix) with ESMTP for ; Thu, 29 Nov 2018 04:28:38 +0000 (GMT) Received: by birb.localdomain (Postfix, from userid 1000) id CD82F4E8865; Thu, 29 Nov 2018 15:28:34 +1100 (AEDT) From: Stewart Smith To: skiboot@lists.ozlabs.org Date: Thu, 29 Nov 2018 15:28:33 +1100 X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129042833.27376-1-stewart@linux.ibm.com> References: <20181129042833.27376-1-stewart@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 18112904-0040-0000-0000-0000049A1CCF X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00010140; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000270; SDB=6.01124286; UDB=6.00577119; IPR=6.00904413; MB=3.00024376; MTD=3.00000008; XFM=3.00000015; UTC=2018-11-29 04:28:40 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18112904-0041-0000-0000-000008A33350 Message-Id: <20181129042833.27376-9-stewart@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-11-29_03:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811290035 Subject: [Skiboot] [PATCH 8/8] hw/bt.c: Move some debug ifdef to make static analysis happy X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Okay, so maybe the static analysis warning is all useless, and maybe having the ifdef around a call is actually useful. I'll take the less noise in my CI static analysis thing. Signed-off-by: Stewart Smith --- hw/bt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/bt.c b/hw/bt.c index 17c6de4ecf58..db214b217efa 100644 --- a/hw/bt.c +++ b/hw/bt.c @@ -409,9 +409,9 @@ static void bt_expire_old_msg(uint64_t tb) } } +#if BT_QUEUE_DEBUG static void print_debug_queue_info(void) { -#if BT_QUEUE_DEBUG struct bt_msg *msg; static bool printed; @@ -426,8 +426,8 @@ static void print_debug_queue_info(void) printed = true; prlog(PR_DEBUG, "----- BT Msg Queue Empty -----\n"); } -#endif } +#endif static void bt_send_and_unlock(void) { @@ -473,7 +473,9 @@ static void bt_poll(struct timer *t __unused, void *data __unused, */ lock(&bt.lock); +#if BT_QUEUE_DEBUG print_debug_queue_info(); +#endif bt_ctrl = bt_inb(BT_CTRL);