From patchwork Tue May 28 14:24:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10965065 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D1D7476 for ; Tue, 28 May 2019 14:25:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C16971FFFE for ; Tue, 28 May 2019 14:25:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B5404285AD; Tue, 28 May 2019 14:25:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 76B921FFFE for ; Tue, 28 May 2019 14:25:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4324017BC; Tue, 28 May 2019 16:24:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4324017BC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559053546; bh=+TfByo3mCFGVU0i8d5bJgQlVVklArf1uEFWae89Rfp0=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vCMjb8/OvNMeLONBWOXxmOxIqTm3djsEaYjZ1c5lidEj2c79R/ZcT+RXT7qMJrU5R QcEfHDyZ0zLBu8dgMC1lJmBh9K53rG30rAMKvlb9SId+J9hFBsj+vfc7d5TwsnJPeJ bNf5iNzQTHCTkSUa1Gwp8eQV3b2fB4FabuY24920= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id B78B6F896EB; Tue, 28 May 2019 16:24:55 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 072FAF89728; Tue, 28 May 2019 16:24:45 +0200 (CEST) Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 693A3F896EB for ; Tue, 28 May 2019 16:24:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 693A3F896EB Received: from ramsan ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id HqQS200073XaVaC01qQSAk; Tue, 28 May 2019 16:24:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hVd1e-00058G-2v; Tue, 28 May 2019 16:24:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hVd1e-00057O-1L; Tue, 28 May 2019 16:24:26 +0200 From: Geert Uytterhoeven To: Igor Konopko , David Howells , "Mohit P . Tahiliani" , Takashi Sakamoto , Eran Ben Elisha , Matias Bjorling , Jiri Pirko , "David S . Miller" , Jamal Hadi Salim , Cong Wang , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , Joe Perches , Arnd Bergmann , Dan Carpenter Date: Tue, 28 May 2019 16:24:20 +0200 Message-Id: <20190528142424.19626-2-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528142424.19626-1-geert@linux-m68k.org> References: <20190528142424.19626-1-geert@linux-m68k.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Geert Uytterhoeven , linux-afs@lists.infradead.org Subject: [alsa-devel] [PATCH 1/5] lightnvm: Fix uninitialized pointer in nvm_remove_tgt() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.1: drivers/lightnvm/core.c: In function ‘nvm_remove_tgt’: drivers/lightnvm/core.c:510: warning: ‘t’ is used uninitialized in this function Indeed, if no NVM devices have been registered, t will be an uninitialized pointer, and may be dereferenced later. A call to nvm_remove_tgt() can be triggered from userspace by issuing the NVM_DEV_REMOVE ioctl on the lightnvm control device. Fix this by preinitializing t to NULL. Fixes: 843f2edbdde085b4 ("lightnvm: do not remove instance under global lock") Signed-off-by: Geert Uytterhoeven --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 0df7454832efe082..aa017f48eb8c588c 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -492,7 +492,7 @@ static void __nvm_remove_target(struct nvm_target *t, bool graceful) */ static int nvm_remove_tgt(struct nvm_ioctl_remove *remove) { - struct nvm_target *t; + struct nvm_target *t = NULL; struct nvm_dev *dev; down_read(&nvm_lock); From patchwork Tue May 28 14:24:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10965075 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60B8B76 for ; Tue, 28 May 2019 14:29:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C7BF1FE95 for ; Tue, 28 May 2019 14:29:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3DA511FFFE; Tue, 28 May 2019 14:29:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 812091FE95 for ; Tue, 28 May 2019 14:29:19 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C44BB1801; Tue, 28 May 2019 16:28:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C44BB1801 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559053757; bh=Av5IsXLWc6LZq/FbJ6hiMNMRzze+iI32vT/b7ABUEgU=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=DznVpcOaULWL3eSkFQA+YPSy6HPtD1LfiFxOja9MJ7XofWOl40le6Z8wzEuwdHLaE fs9ekScfM0Lz7L68MnhBmzKtRnv1j3E/HtaomQZ+qHnTi+qPWAoIx36qVGaT+xR2ro qxoEQk4VSTqbNQaAUrByRycu6KBmAb8rZzWHTLWI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2DB9FF8973B; Tue, 28 May 2019 16:25:01 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 12B1BF896EB; Tue, 28 May 2019 16:24:50 +0200 (CEST) Received: from xavier.telenet-ops.be (xavier.telenet-ops.be [IPv6:2a02:1800:120:4::f00:14]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 26D82F8072E for ; Tue, 28 May 2019 16:24:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 26D82F8072E Received: from ramsan ([84.194.111.163]) by xavier.telenet-ops.be with bizsmtp id HqQS2000L3XaVaC01qQSyd; Tue, 28 May 2019 16:24:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hVd1e-00058J-3j; Tue, 28 May 2019 16:24:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hVd1e-00057Q-26; Tue, 28 May 2019 16:24:26 +0200 From: Geert Uytterhoeven To: Igor Konopko , David Howells , "Mohit P . Tahiliani" , Takashi Sakamoto , Eran Ben Elisha , Matias Bjorling , Jiri Pirko , "David S . Miller" , Jamal Hadi Salim , Cong Wang , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , Joe Perches , Arnd Bergmann , Dan Carpenter Date: Tue, 28 May 2019 16:24:21 +0200 Message-Id: <20190528142424.19626-3-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528142424.19626-1-geert@linux-m68k.org> References: <20190528142424.19626-1-geert@linux-m68k.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Geert Uytterhoeven , linux-afs@lists.infradead.org Subject: [alsa-devel] [PATCH 2/5] rxrpc: Fix uninitialized error code in rxrpc_send_data_packet() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.1: net/rxrpc/output.c: In function ‘rxrpc_send_data_packet’: net/rxrpc/output.c:338: warning: ‘ret’ may be used uninitialized in this function Indeed, if the first jump to the send_fragmentable label is made, and the address family is not handled in the switch() statement, ret will be used uninitialized. Fix this by initializing err to zero before the jump, like is already done for the jump to the done label. Fixes: 5a924b8951f835b5 ("rxrpc: Don't store the rxrpc header in the Tx queue sk_buffs") Signed-off-by: Geert Uytterhoeven --- While this is not a real false-positive, I believe it cannot cause harm in practice, as AF_RXRPC cannot be used with other transport families than IPv4 and IPv6. --- net/rxrpc/output.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/rxrpc/output.c b/net/rxrpc/output.c index 004c762c2e8d063c..1473d774d67100c5 100644 --- a/net/rxrpc/output.c +++ b/net/rxrpc/output.c @@ -403,8 +403,10 @@ int rxrpc_send_data_packet(struct rxrpc_call *call, struct sk_buff *skb, /* send the packet with the don't fragment bit set if we currently * think it's small enough */ - if (iov[1].iov_len >= call->peer->maxdata) + if (iov[1].iov_len >= call->peer->maxdata) { + ret = 0; goto send_fragmentable; + } down_read(&conn->params.local->defrag_sem); From patchwork Tue May 28 14:24:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10965067 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C9D4676 for ; Tue, 28 May 2019 14:26:44 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B99EE27F7F for ; Tue, 28 May 2019 14:26:44 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AC85F2837E; Tue, 28 May 2019 14:26:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B995E285BA for ; Tue, 28 May 2019 14:26:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4022617D9; Tue, 28 May 2019 16:25:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4022617D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559053601; bh=sNpFLMtvp1igvV2HtYEvqysgJOYOeYtLGN0upO1mZwk=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=kuMYSvNucyDLtVEh5Q9p7HGp1mBdOU3CMrDNN3Wv6ufpsAHlVIC7CEKsfWNxEg54S 413Ot51e3LhaTBVr2pr9EkcGSSfYNRgpPCwyy343vb2WK3pu2vDqzvpbYDJDHVOrk1 Pi08IdaaDeSGJaHWK7RoPUNtbnWXDHVtTnS607kU= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 32B5FF8971D; Tue, 28 May 2019 16:24:57 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3984AF896EB; Tue, 28 May 2019 16:24:45 +0200 (CEST) Received: from laurent.telenet-ops.be (laurent.telenet-ops.be [IPv6:2a02:1800:110:4::f00:19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3FEDEF896B8 for ; Tue, 28 May 2019 16:24:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3FEDEF896B8 Received: from ramsan ([84.194.111.163]) by laurent.telenet-ops.be with bizsmtp id HqQS200083XaVaC01qQSAl; Tue, 28 May 2019 16:24:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hVd1e-00058L-4Z; Tue, 28 May 2019 16:24:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hVd1e-00057S-2y; Tue, 28 May 2019 16:24:26 +0200 From: Geert Uytterhoeven To: Igor Konopko , David Howells , "Mohit P . Tahiliani" , Takashi Sakamoto , Eran Ben Elisha , Matias Bjorling , Jiri Pirko , "David S . Miller" , Jamal Hadi Salim , Cong Wang , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , Joe Perches , Arnd Bergmann , Dan Carpenter Date: Tue, 28 May 2019 16:24:22 +0200 Message-Id: <20190528142424.19626-4-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528142424.19626-1-geert@linux-m68k.org> References: <20190528142424.19626-1-geert@linux-m68k.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Geert Uytterhoeven , linux-afs@lists.infradead.org Subject: [alsa-devel] [PATCH 3/5] net: sched: pie: Use ULL suffix for 64-bit constant X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.1, when compiling for a 32-bit platform: net/sched/sch_pie.c: In function ‘drop_early’: net/sched/sch_pie.c:116: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:138: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:144: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:147: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c: In function ‘pie_qdisc_enqueue’: net/sched/sch_pie.c:173: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c: In function ‘calculate_probability’: net/sched/sch_pie.c:371: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:372: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:377: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:382: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:397: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:398: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:399: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:407: warning: integer constant is too large for ‘long’ type net/sched/sch_pie.c:414: warning: integer constant is too large for ‘long’ type Fix this by adding the missing "ULL" suffix. Fixes: 3f7ae5f3dc5295ac ("net: sched: pie: add more cases to auto-tune alpha and beta") Signed-off-by: Geert Uytterhoeven --- net/sched/sch_pie.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sched/sch_pie.c b/net/sched/sch_pie.c index 8fa129d3943e32ad..f3424833e6a7cd3b 100644 --- a/net/sched/sch_pie.c +++ b/net/sched/sch_pie.c @@ -31,7 +31,7 @@ #define QUEUE_THRESHOLD 16384 #define DQCOUNT_INVALID -1 -#define MAX_PROB 0xffffffffffffffff +#define MAX_PROB 0xffffffffffffffffULL #define PIE_SCALE 8 /* parameters used */ From patchwork Tue May 28 14:24:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10965073 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 762FD76 for ; Tue, 28 May 2019 14:28:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6495B1FE95 for ; Tue, 28 May 2019 14:28:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 581211FFD8; Tue, 28 May 2019 14:28:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A7D171FE95 for ; Tue, 28 May 2019 14:28:47 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id D026417D9; Tue, 28 May 2019 16:27:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D026417D9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559053725; bh=AWbLQlPqiWYBdpCxWamnuD/Bm9aPxMeDqKGeBI+dXoI=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=ZELTVxQTY3WDkNM3LH7AqeicVr1xGSiKKNNThi1LpawgPuPGcpWln5L2rkz/qSphx f2qh51CR5HCO+TrgVyYkUXDP3rovH0d0OwlFTO5yai1TfYDqMZGB7vOdHhw6DrSUdF zLLkiAPNoBFXfNI6capuZUwWQyFq5xyXqkeswC5A= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 21BFAF89737; Tue, 28 May 2019 16:25:00 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id D90D7F89706; Tue, 28 May 2019 16:24:48 +0200 (CEST) Received: from baptiste.telenet-ops.be (baptiste.telenet-ops.be [IPv6:2a02:1800:120:4::f00:13]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 314ABF89719 for ; Tue, 28 May 2019 16:24:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 314ABF89719 Received: from ramsan ([84.194.111.163]) by baptiste.telenet-ops.be with bizsmtp id HqQS2000C3XaVaC01qQSFC; Tue, 28 May 2019 16:24:42 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hVd1e-00058N-5X; Tue, 28 May 2019 16:24:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hVd1e-00057W-3p; Tue, 28 May 2019 16:24:26 +0200 From: Geert Uytterhoeven To: Igor Konopko , David Howells , "Mohit P . Tahiliani" , Takashi Sakamoto , Eran Ben Elisha , Matias Bjorling , Jiri Pirko , "David S . Miller" , Jamal Hadi Salim , Cong Wang , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , Joe Perches , Arnd Bergmann , Dan Carpenter Date: Tue, 28 May 2019 16:24:23 +0200 Message-Id: <20190528142424.19626-5-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528142424.19626-1-geert@linux-m68k.org> References: <20190528142424.19626-1-geert@linux-m68k.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Geert Uytterhoeven , linux-afs@lists.infradead.org Subject: [alsa-devel] [PATCH 4/5] ALSA: fireface: Use ULL suffixes for 64-bit constants X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.1: sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_switch_fetching_mode’: sound/firewire/fireface/ff-protocol-latter.c:97: warning: integer constant is too large for ‘long’ type sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_begin_session’: sound/firewire/fireface/ff-protocol-latter.c:170: warning: integer constant is too large for ‘long’ type sound/firewire/fireface/ff-protocol-latter.c:197: warning: integer constant is too large for ‘long’ type sound/firewire/fireface/ff-protocol-latter.c:205: warning: integer constant is too large for ‘long’ type sound/firewire/fireface/ff-protocol-latter.c: In function ‘latter_finish_session’: sound/firewire/fireface/ff-protocol-latter.c:214: warning: integer constant is too large for ‘long’ type Fix this by adding the missing "ULL" suffixes. Add the same suffix to the last constant, to maintain consistency. Fixes: fd1cc9de64c2ca6c ("ALSA: fireface: add support for Fireface UCX") Signed-off-by: Geert Uytterhoeven Reviewed-by: Takashi Sakamoto --- sound/firewire/fireface/ff-protocol-latter.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/firewire/fireface/ff-protocol-latter.c b/sound/firewire/fireface/ff-protocol-latter.c index c8236ff89b7fb9de..b30d02d359b1d21b 100644 --- a/sound/firewire/fireface/ff-protocol-latter.c +++ b/sound/firewire/fireface/ff-protocol-latter.c @@ -9,11 +9,11 @@ #include "ff.h" -#define LATTER_STF 0xffff00000004 -#define LATTER_ISOC_CHANNELS 0xffff00000008 -#define LATTER_ISOC_START 0xffff0000000c -#define LATTER_FETCH_MODE 0xffff00000010 -#define LATTER_SYNC_STATUS 0x0000801c0000 +#define LATTER_STF 0xffff00000004ULL +#define LATTER_ISOC_CHANNELS 0xffff00000008ULL +#define LATTER_ISOC_START 0xffff0000000cULL +#define LATTER_FETCH_MODE 0xffff00000010ULL +#define LATTER_SYNC_STATUS 0x0000801c0000ULL static int parse_clock_bits(u32 data, unsigned int *rate, enum snd_ff_clock_src *src) From patchwork Tue May 28 14:24:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 10965069 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1973B92A for ; Tue, 28 May 2019 14:27:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0A4E12889E for ; Tue, 28 May 2019 14:27:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F1D13288AA; Tue, 28 May 2019 14:27:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37E96285AD for ; Tue, 28 May 2019 14:27:29 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7C36317D1; Tue, 28 May 2019 16:26:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7C36317D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1559053647; bh=aeQ9tbfiuIuMW42cCOm1vOtx2zMH4drg0BhIbw5yTno=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=i5Wgq60W20jTvL0xyXA48XIXJ9VXd5X4bsdL+FsvXrmQrJioTfNMRYJsoHS2FUo0o +e+s5x10LmiJm3sDPyTVeaiql6EFN44nCKp/j3AHJhH0RRGlh9CFwCwNBtyCH0DCIY wmvPYgSV7HbysAwJkd2HfRjRCI/8ZJst/Fh/VD+Y= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 51C7BF8972D; Tue, 28 May 2019 16:24:58 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa1.perex.cz (Postfix, from userid 50401) id 64F1CF8970A; Tue, 28 May 2019 16:24:46 +0200 (CEST) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BF615F89706 for ; Tue, 28 May 2019 16:24:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BF615F89706 Received: from ramsan ([84.194.111.163]) by albert.telenet-ops.be with bizsmtp id HqQS2000E3XaVaC06qQSub; Tue, 28 May 2019 16:24:41 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan with esmtp (Exim 4.90_1) (envelope-from ) id 1hVd1e-00058P-7H; Tue, 28 May 2019 16:24:26 +0200 Received: from geert by rox.of.borg with local (Exim 4.90_1) (envelope-from ) id 1hVd1e-00057Z-4f; Tue, 28 May 2019 16:24:26 +0200 From: Geert Uytterhoeven To: Igor Konopko , David Howells , "Mohit P . Tahiliani" , Takashi Sakamoto , Eran Ben Elisha , Matias Bjorling , Jiri Pirko , "David S . Miller" , Jamal Hadi Salim , Cong Wang , Clemens Ladisch , Jaroslav Kysela , Takashi Iwai , Joe Perches , Arnd Bergmann , Dan Carpenter Date: Tue, 28 May 2019 16:24:24 +0200 Message-Id: <20190528142424.19626-6-geert@linux-m68k.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190528142424.19626-1-geert@linux-m68k.org> References: <20190528142424.19626-1-geert@linux-m68k.org> MIME-Version: 1.0 Cc: alsa-devel@alsa-project.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Geert Uytterhoeven , linux-afs@lists.infradead.org Subject: [alsa-devel] [PATCH 5/5] [RFC] devlink: Fix uninitialized error code in devlink_fmsg_prepare_skb() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" X-Virus-Scanned: ClamAV using ClamSMTP With gcc 4.1: net/core/devlink.c: In function ‘devlink_fmsg_prepare_skb’: net/core/devlink.c:4325: warning: ‘err’ may be used uninitialized in this function Indeed, if the list has less than *start entries, an uninitialized error code will be returned. Fix this by preinitializing err to zero. Fixes: 1db64e8733f65381 ("devlink: Add devlink formatted message (fmsg) API") Signed-off-by: Geert Uytterhoeven Reviewed-by: Eran Ben Elisha Acked-by: Jiri Pirko --- I don't know if this can really happen, and if this is the right fix. Perhaps err should be initialized to some valid error code instead? --- net/core/devlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index d43bc52b8840d76b..91377e4eae9a43c1 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4321,8 +4321,8 @@ devlink_fmsg_prepare_skb(struct devlink_fmsg *fmsg, struct sk_buff *skb, { struct devlink_fmsg_item *item; struct nlattr *fmsg_nlattr; + int err = 0; int i = 0; - int err; fmsg_nlattr = nla_nest_start_noflag(skb, DEVLINK_ATTR_FMSG); if (!fmsg_nlattr)