From patchwork Tue Sep 29 06:22:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 292600 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC7A8C4346E for ; Tue, 29 Sep 2020 06:22:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 969212158C for ; Tue, 29 Sep 2020 06:22:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601360539; bh=ZyVD1XdHFaVROkIdHCFvck0teGNr3aa8T76cc65QcKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=zJvAEBuQ8lN6dx+rXzG+9yce/ARLsYqtXY5fvvrcjG7SKzG5CeFv4NpcnoyTifu7p 4QPCgw3TlCA6JvodW3LGsiJGLFrdpcTHP1tRMr827RrJfKz/Q9liU05zTtgtSPbb+I 3cJbvDQb7fRAIAn8m/KhoTfMGwLZRjwMaVdp8fQA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725468AbgI2GWT (ORCPT ); Tue, 29 Sep 2020 02:22:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:50188 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgI2GWS (ORCPT ); Tue, 29 Sep 2020 02:22:18 -0400 Received: from mail.kernel.org (ip5f5ad5bc.dynamic.kabel-deutschland.de [95.90.213.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4C71A21548; Tue, 29 Sep 2020 06:22:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601360538; bh=ZyVD1XdHFaVROkIdHCFvck0teGNr3aa8T76cc65QcKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UO3PHmq/wo8xkzxywzEmE2oZjUaE/tlIQhAtd1XWhAvZeKLxSj++ngo8z8huEhSI6 x74WJl07HnMdBgL+90IhbquahJcIO18EkJBJFx52gXEQmlGrbO2GS18C/ww3I7Vzne wLpfdX0W2NVThZsp2yKU6AqaekZX4IUel5+OAVoo= Received: from mchehab by mail.kernel.org with local (Exim 4.94) (envelope-from ) id 1kN91j-000cE3-Ko; Tue, 29 Sep 2020 08:22:15 +0200 From: Mauro Carvalho Chehab To: Stephen Boyd Cc: linuxarm@huawei.com, mauro.chehab@huawei.com, Mauro Carvalho Chehab , "John Stultz" , "Manivannan Sadhasivam" , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] spmi: get rid of a warning when built with W=1 Date: Tue, 29 Sep 2020 08:22:12 +0200 Message-Id: X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Sender: Mauro Carvalho Chehab Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The SPMI core complaing with this warning when built with W=1: drivers/spmi/spmi.c: In function ‘spmi_controller_remove’: drivers/spmi/spmi.c:548:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] 548 | int dummy; | ^~~~~ As the dummy var isn't needed, remove it. Reviewed-by: Stephen Boyd Signed-off-by: Mauro Carvalho Chehab --- drivers/spmi/spmi.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index c16b60f645a4..fd3ff6079b15 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -545,13 +545,10 @@ static int spmi_ctrl_remove_device(struct device *dev, void *data) */ void spmi_controller_remove(struct spmi_controller *ctrl) { - int dummy; - if (!ctrl) return; - dummy = device_for_each_child(&ctrl->dev, NULL, - spmi_ctrl_remove_device); + device_for_each_child(&ctrl->dev, NULL, spmi_ctrl_remove_device); device_del(&ctrl->dev); } EXPORT_SYMBOL_GPL(spmi_controller_remove);