From patchwork Thu Jun 25 19:17:05 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 11627195 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 2BCCC6C1 for ; Fri, 26 Jun 2020 11:14:19 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 040AC2080C for ; Fri, 26 Jun 2020 11:14:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="S2qEJgkZ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="i7Nzr0VW"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="zves/PjM" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 040AC2080C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=jj1aFwfirGAu66EKbPgo08FOHGKXveGVl2gy/X3IfF0=; b=S2qEJgkZ0gq29w92wJF5laBX/ yX+Dnxt97h2ch8NwV2tRBWYDnaOT+9nyBnbjoauI631ykMAe8slWy7edcZk5g/N/CMyTVJEI+be3J /ffAzC0DW0KrWPbDb4+XYceHftURL9x/C29vWWfHWuZp9ersz1sWoFe3XlvEIwjHnv4BH8j8Xh9br XYHIAc7s7GBIEdxqa76RhYp1LXnmZ1QDrglGRDWWqyYisKyTpUvnkgGICH2MIHETjvUhw+ZfSHamP Ymp/cuQSDoNhdtedMoxVzwC//Bp+NO/p/lPH7m1/dFSlsJyZCKn6RxF1BzvDbqv4S6en6w6VoSEmP fY+fCUrbg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomHS-0005KB-Js; Fri, 26 Jun 2020 11:12:26 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jomFJ-0003r5-Eq for linux-arm-kernel@merlin.infradead.org; Fri, 26 Jun 2020 11:10:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=VJTFtlmSJJssMoK2NzaWqKKHmjNJh935ngd0RHoSQ4I=; b=i7Nzr0VWRo08OXHWytAnB//Tni JIGhY1P20u+km9kFaDMjD3zrrl2L8+NNC9vQi95fJ05/CM5809KmrOqCpDAsjvsH8UhvWbJWxfdZa IHS2ZMxgpP0vpuahBZJeY03izGEQhhCsy9X5Pno4lUR02JRQaE1PViLlr5L8p8IMsxkgLURPGkv5J Ex/HF04XMtUqz3heGusNJdUSiRro1+KhgDvLJQtF5Eyp/epLLR1ADyQJUyEFQPCmdHzz29UwhChkj v90O0AL7bGZjNHe+xOVrRGpvnBLyjvLMzbVL0h4OMNv/XHaxYc9aTRl6aFcYaXH5NJ9TBBmWSOpJ5 0F7BRvDQ==; Received: from mail-lf1-x144.google.com ([2a00:1450:4864:20::144]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jom4V-0004oF-Ci for linux-arm-kernel@lists.infradead.org; Fri, 26 Jun 2020 10:59:11 +0000 Received: by mail-lf1-x144.google.com with SMTP id t74so4930301lff.2 for ; Fri, 26 Jun 2020 03:59:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VJTFtlmSJJssMoK2NzaWqKKHmjNJh935ngd0RHoSQ4I=; b=zves/PjMXG5dsDUU3LkKSqvd8Bb0cLVC4eNdrmRTaXPn3sjcy9wIXCjmp4oOjJ298l YwImrnxAene93jXTIWVWM7v1FnFrZ2XY/VT3blGeG+jT79aoHFGu1p5/clb2w+cMbLX3 b093iveq45CviyVp7oOKIxrnO/t3MVXzq44W/IWi77iSIsZ482hjzQKzReXHdOVjv3XL kD+qjvbQVJPQsSEtil8n/WCGrxnO/6kdotX1ZWjp2HJbChf8oPE4thsI9msSAs/bKVER gz8oecwLYYbbG+Li7kB9lUjOPlCnykyn00TgD9mURb3uGkJm+yPXNknQkKxyS1j6Ijdl u1mA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VJTFtlmSJJssMoK2NzaWqKKHmjNJh935ngd0RHoSQ4I=; b=dfUbUaKii+G0+nmj4NzFpbo+GaqGHrToQ1OBlfbuuZRnvQjDLyGGDU9BUanBHuf5s+ FwzJ0BhSAGN6i6b58oO7OVxRiORdBTrGrJ9q2b6YC72qCdStQ0ea3gFOcGhgGQanldm7 N0ahwlrUxomvM0q9Obd6LBOwUo6MAUbVo9ZEXeQLiHx+pNd0ib0JmSIvs7VGq0XaGy7M WXLWJ5Rq+MKrMovpHiq2ppNbxgKPMB0CLg+bNGUfJX3ZE5cYqIic/fHGLJVGuIHxse6C tUAia+FRc+L4tm/jt9SuxjRYEH/Q84SQ/5AKJHdeuaqyu3Id5YjKCS+flvIrp9GDvid0 YHPg== X-Gm-Message-State: AOAM531ZNXIN0kfkb9RCsMdc7ETCocu3VZM2g0bJErrRkM2C4Q1LvprL qhJRcWzhgBnZOBvQQFqQuawFpJC0OTvPwg== X-Google-Smtp-Source: ABdhPJymLg8gydmo/J1S/z2FvMDOD/E0XTWBEtx2MX9NS1hIZsEuZGaoD+dfeVXI2wMZrmEbLwn25g== X-Received: by 2002:a5d:46d0:: with SMTP id g16mr41499262wrs.229.1593112642402; Thu, 25 Jun 2020 12:17:22 -0700 (PDT) Received: from localhost.localdomain ([2.27.35.144]) by smtp.gmail.com with ESMTPSA id p13sm22693983wrn.0.2020.06.25.12.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 12:17:21 -0700 (PDT) From: Lee Jones To: lgirdwood@gmail.com, broonie@kernel.org Subject: [RESEND 07/10] regulator: cpcap-regulator: Remove declared and set, but never used variable 'ignore' Date: Thu, 25 Jun 2020 20:17:05 +0100 Message-Id: <20200625191708.4014533-8-lee.jones@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200625191708.4014533-1-lee.jones@linaro.org> References: <20200625191708.4014533-1-lee.jones@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200626_115906_251720_D0B763F4 X-CRM114-Status: GOOD ( 14.57 ) X-Spam-Score: -2.1 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2a00:1450:4864:20:0:0:0:144 listed in] [list.dnswl.org] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tony Lindgren , Lee Jones , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org It's okay to not check the return value that you're not conserned about, however it is not okay to assign a variable and not check or use the result. Fixes W=1 warnings(s): drivers/regulator/cpcap-regulator.c:172:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable] 172 | int error, ignore; | ^~~~~~ drivers/regulator/cpcap-regulator.c: In function ‘cpcap_regulator_disable’: drivers/regulator/cpcap-regulator.c:196:13: warning: variable ‘ignore’ set but not used [-Wunused-but-set-variable] 196 | int error, ignore; | ^~~~~~ Cc: Tony Lindgren Signed-off-by: Lee Jones Acked-by: Tony Lindgren --- drivers/regulator/cpcap-regulator.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/regulator/cpcap-regulator.c b/drivers/regulator/cpcap-regulator.c index f80781d58a282..fbf823b830308 100644 --- a/drivers/regulator/cpcap-regulator.c +++ b/drivers/regulator/cpcap-regulator.c @@ -169,7 +169,7 @@ enum cpcap_regulator_id { static int cpcap_regulator_enable(struct regulator_dev *rdev) { struct cpcap_regulator *regulator = rdev_get_drvdata(rdev); - int error, ignore; + int error; error = regulator_enable_regmap(rdev); if (error) @@ -180,7 +180,7 @@ static int cpcap_regulator_enable(struct regulator_dev *rdev) regulator->assign_mask, regulator->assign_mask); if (error) - ignore = regulator_disable_regmap(rdev); + regulator_disable_regmap(rdev); } return error; @@ -193,7 +193,7 @@ static int cpcap_regulator_enable(struct regulator_dev *rdev) static int cpcap_regulator_disable(struct regulator_dev *rdev) { struct cpcap_regulator *regulator = rdev_get_drvdata(rdev); - int error, ignore; + int error; if (rdev->desc->enable_val & CPCAP_REG_OFF_MODE_SEC) { error = regmap_update_bits(rdev->regmap, regulator->assign_reg, @@ -204,9 +204,9 @@ static int cpcap_regulator_disable(struct regulator_dev *rdev) error = regulator_disable_regmap(rdev); if (error && (rdev->desc->enable_val & CPCAP_REG_OFF_MODE_SEC)) { - ignore = regmap_update_bits(rdev->regmap, regulator->assign_reg, - regulator->assign_mask, - regulator->assign_mask); + regmap_update_bits(rdev->regmap, regulator->assign_reg, + regulator->assign_mask, + regulator->assign_mask); } return error;