From patchwork Thu May 28 22:43:52 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 11577133 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D19A292A for ; Thu, 28 May 2020 22:44:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEE4220721 for ; Thu, 28 May 2020 22:44:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MmFw3MZQ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=dabbelt-com.20150623.gappssmtp.com header.i=@dabbelt-com.20150623.gappssmtp.com header.b="gzq7o17B" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AEE4220721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:To:From: Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject:Reply-To: Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=l45d2ebIgVTYBdcwadzZn1AiPQm55aaNY7J4mpFY86s=; b=MmFw3MZQUN/DJh KvPgFvcHnb70iH7SCIrEc/8Lfzsx8IU2eFzngdLjon2pZEiuh56XHQAjNYU0b7yPQOV4NPGFcHhdS 9xGXgGZPhnVcmfP3uJV1Pi6A65Ovi4iMEYnPMRwstNrdsRa2HlNnZwTl7NzuSG+H60hTQzMx3q21+ VVsQSP3ACWM/I4vRZTmpMqiutAU35ZuRQ/unZdcj0PuGyPR+A/77XyZE58docOMXJEfbqYR3YNbMJ qvyFnQaovLLfw3+DjBgF0bIXrcv4SXBkn0Dcbail4qr7+3uqTAUf87hSnmosNydP4g29Gnu/cUC7T jL23aoWy3hteXM1cF8QQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeRFy-0001Rm-6X; Thu, 28 May 2020 22:44:10 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeRFv-0001Qo-5J for linux-riscv@lists.infradead.org; Thu, 28 May 2020 22:44:09 +0000 Received: by mail-pg1-x544.google.com with SMTP id u5so310614pgn.5 for ; Thu, 28 May 2020 15:44:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=subject:date:message-id:mime-version:content-transfer-encoding:cc :from:to; bh=l45d2ebIgVTYBdcwadzZn1AiPQm55aaNY7J4mpFY86s=; b=gzq7o17BUls8m2QY2K9AJK73zJe60aWiWfGiLBL/NiD7RUd+s6lCnOfHl7LoNFT1j8 qUfkNJRnB4CVStoGo7C3cdIym/GnWivmbC9QxLGwQnffvtyrbxvnJGPRw7RWIsuC7vUG FLFzERKd/C0fKkrxYUq6SV8Tg4nf6ol0XslnBxchnkDaurX2rs9c3LDvq8sgF0RgXViB ehS3OoqYMb91sZHeE2cWUKybggSjQDPEf7unUbr4TKmzePcNEut6vMJ2/xpXZPXea2ww gqQixF/rQUwmBXjbvbOCl6doypj/KE5VWH0xcSnS+tnL/w2h0J6I5ff1MQ5MQlVEus29 xaDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:mime-version :content-transfer-encoding:cc:from:to; bh=l45d2ebIgVTYBdcwadzZn1AiPQm55aaNY7J4mpFY86s=; b=sOfzGBLdVL7EN5M3cac+z/kmkybOJj9pAu8FKq/hFBfoGX0fZTrLftAhCc1v3zFMZK E57MSJnnCdRSfYCIGgqFP19vvgu4hWei4NP49jOd3rGJA/FwL4CaDLCj3laM6w4q+CKI EkH2dalucrt8xjCZ5TFGZ2m/zNJXIyV//VbmR61ggOcGQK8yQ7jHcfoT9tGsAvb0FBVk 6Nhj+3huNHt23whDxwLuzDlQTbhKNoWcqP+MtIXdRvqqhVdkS17NUkBXLI+yu3VhHdll 73gvfK776pF5WK8zzNotGiIwwxMi7vz/hLlEapkH5ds9DnKS66rYXvj4PV/Ok1/kmVxT gpCw== X-Gm-Message-State: AOAM5319f0ddYB9vDJ6hDb2GY2nNPIzip73exrZOGR5fsXIlG3tlQzAN nM+rTQjf+pGS/s9t/Qf4TMRSAw== X-Google-Smtp-Source: ABdhPJwq9RAGTsT72bc6ZS4m4DqTZ9XT3ecH6wm1LPKrA30nov53xcwsWLSkrP5e8rF1Klixj+jFzQ== X-Received: by 2002:aa7:9e52:: with SMTP id z18mr5446497pfq.57.1590705844915; Thu, 28 May 2020 15:44:04 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id e19sm5488131pfn.17.2020.05.28.15.44.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 15:44:04 -0700 (PDT) Subject: [PATCH 1/2] soc: sifive: l2 cache: Eliminate an unsigned zero compare warning Date: Thu, 28 May 2020 15:43:52 -0700 Message-Id: <20200528224353.32559-1-palmer@dabbelt.com> X-Mailer: git-send-email 2.27.0.rc0.183.gde8f92d652-goog MIME-Version: 1.0 From: Palmer Dabbelt To: linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200528_154407_268624_52D06447 X-CRM114-Status: GOOD ( 10.57 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:544 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: anup@brainfault.org, Palmer Dabbelt , linux-kernel@vger.kernel.org, yash.shah@sifive.com, Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, bp@suse.de, kernel-team@android.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org From: Palmer Dabbelt GCC warns about this comparison, which is unnecessary. Signed-off-by: Palmer Dabbelt --- drivers/soc/sifive/sifive_l2_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index d5f266551880..51e198880a8d 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -51,7 +51,7 @@ static ssize_t l2_write(struct file *file, const char __user *data, if (kstrtouint_from_user(data, count, 0, &val)) return -EINVAL; - if ((val >= 0 && val < 0xFF) || (val >= 0x10000 && val < 0x100FF)) + if ((val < 0xFF) || (val >= 0x10000 && val < 0x100FF)) writel(val, l2_base + SIFIVE_L2_ECCINJECTERR); else return -EINVAL; From patchwork Thu May 28 22:43:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Palmer Dabbelt X-Patchwork-Id: 11577135 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2EEF7913 for ; Thu, 28 May 2020 22:44:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0C2C520721 for ; Thu, 28 May 2020 22:44:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NXBuVypI"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=dabbelt-com.20150623.gappssmtp.com header.i=@dabbelt-com.20150623.gappssmtp.com header.b="dDY0jVQs" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C2C520721 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=dabbelt.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:To:From: Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date :Subject:Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QBaFOqv0c0/uBoZDY4aBNnVcpPLEnLmvCHMRgMWJn+k=; b=NXBuVypIiBKPuMuv16213h5CS FxGs8KDHRo/ZFwEgRDVbH7eEfVmxshvohbIJErPquzIRWnDDijYHSY5XNFvEy8lq+RYg2k+wslcXc SWaYXQUjOOd4QL6BmqI/MJCIQVutoe0+sxhe4KVGSXAXvZHCx6q9iibUWjGa7YvsiSjqnNSHvB2rG Ne5hBvrDusDfJcTYxtuUtpPmG5tqiesBlaESVnFFfYgeLkXCnusRB7khNNwgTin6+1yDImOSjA7ke kV3Hs36uiqhDsCfrNpJnK1LpBaHQ1pyLA9ErmyE3C9Q1aGLF7WOhQXzV8FENYwIa9bkq1Ia/hdQNP wxqx+D5Og==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeRFy-0001SZ-Ty; Thu, 28 May 2020 22:44:10 +0000 Received: from mail-pg1-x544.google.com ([2607:f8b0:4864:20::544]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jeRFw-0001R5-B6 for linux-riscv@lists.infradead.org; Thu, 28 May 2020 22:44:09 +0000 Received: by mail-pg1-x544.google.com with SMTP id r10so302995pgv.8 for ; Thu, 28 May 2020 15:44:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dabbelt-com.20150623.gappssmtp.com; s=20150623; h=subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding:cc:from:to; bh=QBaFOqv0c0/uBoZDY4aBNnVcpPLEnLmvCHMRgMWJn+k=; b=dDY0jVQscLnglFYCeXXKPUxOnkZFOHI5oMCCUUPgtlbaRyofv6Vpb0Him68Mti4lWX 5w0dhZCT7JnfW42xatGA0hjcLyLLONd3lAvTdhtIEM1t7EXrC/kARgFClKxQBhl1jTvE rW1Y2HyQLrpBtepMEL0DV5DPyJ3mDD4EcX0/hfFbLOKZNoWgm4WhcJstUHT8QrtO9QgO q2up7VizS/0UL6ik6mv9JyoT+b44/orAoL0vuXY4DNOIhD6dPyP8l5/wALJE3wu0y+cB Y4gAVxg3JbJNnxjbKrmZUN6pAsRSIRZh53N5a+7JEvhk2BGBzZu0DxsGnteNzQrT0C6u +YCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:cc:from:to; bh=QBaFOqv0c0/uBoZDY4aBNnVcpPLEnLmvCHMRgMWJn+k=; b=rW7TDe4b+7lmwky6hD9vdKGcBniiju/UdhgfVh13lDBG7x+kG2R+jtjj+46JgHEtGi 14AKc388gkgeiPbWizA8+jsdfuIWIP04cn9ppS2FOZDIPTWcwAGKAugpfN5KtUhsMRhq NRNp83qGTk8A0uogOMAh/zb1F3KU7oBwcmayEim9j7mQVl49t87SYADOdv7nyYYPpIzp xHSG/UNI4uQ6HWIgUUACyP/mObEr4zoAnYzKPS+oS6C9y8wriOnaZOEE+2uBgAEwZveY eBIzQeByxNuu/QwBYH5kn93zl3wHaguhabR1mi+mMv9clqW7E0/nNj+kHT68pjrl4iti cMBQ== X-Gm-Message-State: AOAM533esgxbz2fzJtE7ITfFdbLiwLtDtAPRzjGYyALUVyhXdtGb/Iih SO9XuRBB4DGi8nsyVK4201ajqw== X-Google-Smtp-Source: ABdhPJzXp10j3U1SqiSNNvW2qS7iKYsaFZh/pXRojdN889cl3hLRU0TNFJlZmE3kLeQ4vUf429apmA== X-Received: by 2002:a63:ef09:: with SMTP id u9mr5496919pgh.406.1590705846528; Thu, 28 May 2020 15:44:06 -0700 (PDT) Received: from localhost (76-210-143-223.lightspeed.sntcca.sbcglobal.net. [76.210.143.223]) by smtp.gmail.com with ESMTPSA id 9sm6258908pju.1.2020.05.28.15.44.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 May 2020 15:44:06 -0700 (PDT) Subject: [PATCH 2/2] soc: sifive: l2 cache: Mark l2_get_priv_group as static Date: Thu, 28 May 2020 15:43:53 -0700 Message-Id: <20200528224353.32559-2-palmer@dabbelt.com> X-Mailer: git-send-email 2.27.0.rc0.183.gde8f92d652-goog In-Reply-To: <20200528224353.32559-1-palmer@dabbelt.com> References: <20200528224353.32559-1-palmer@dabbelt.com> MIME-Version: 1.0 From: Palmer Dabbelt To: linux-riscv@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200528_154408_375163_A71885E4 X-CRM114-Status: GOOD ( 12.31 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:544 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kbuild test robot , anup@brainfault.org, Palmer Dabbelt , linux-kernel@vger.kernel.org, yash.shah@sifive.com, Palmer Dabbelt , Paul Walmsley , linux-riscv@lists.infradead.org, bp@suse.de, kernel-team@android.com Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org From: Palmer Dabbelt The kbuild test robot is firing a warning over a missing prototype. The function can just be static. Reported-by: kbuild test robot Signed-off-by: Palmer Dabbelt --- drivers/soc/sifive/sifive_l2_cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soc/sifive/sifive_l2_cache.c b/drivers/soc/sifive/sifive_l2_cache.c index 51e198880a8d..44d7e1951da3 100644 --- a/drivers/soc/sifive/sifive_l2_cache.c +++ b/drivers/soc/sifive/sifive_l2_cache.c @@ -133,7 +133,7 @@ static const struct attribute_group priv_attr_group = { .attrs = priv_attrs, }; -const struct attribute_group *l2_get_priv_group(struct cacheinfo *this_leaf) +static const struct attribute_group *l2_get_priv_group(struct cacheinfo *this_leaf) { /* We want to use private group for L2 cache only */ if (this_leaf->level == 2)