Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp774203ybt; Fri, 19 Jun 2020 13:25:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxBGtzTtXIRwAUPmgtHwIF4PB9Xvx61Tf6A+cigg6ltzU047flM5gfLCxj6DMfLqyPjjDW3 X-Received: by 2002:a17:906:2615:: with SMTP id h21mr5195001ejc.84.1592598345196; Fri, 19 Jun 2020 13:25:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592598345; cv=none; d=google.com; s=arc-20160816; b=jMJQkQjZJdnHGAevw4wdOzcWEYu7h91puW+2BjwHfBJeFt07ikUjypgYfMjW9OgI1G KM+Ddu88/jtEeuGNh6I598yOIJYohfw3/n10A4xgAORttjoiwQP8sSdVvtqawA3fVQgi KRhM4JeVSpUB0Gy2b68J9Ed93JYu2WIylIgBTz5JT/YD8878IffjouisiiBi0UgNllDM 1Qfcoium3NFm0j6arBJsJOWeI6BzKmky83dhtb3mKgal48fy5At9DeahsgMeeyo+mYBa 9XOYd6uV+JFqW1sSfAamsvSOIsOmXqfMyiUbIsMgJo8p4HLVWGASjKxNcrv97D4gQXNN 50nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=gWuVW9wu8Y42aks0in8FPGTOFUAw8rmjDxi8sQck3UQ=; b=ohLQeFwvwXzge+hMhi8nJn2t5jywgQVJ9fOxCqoUdi73TqLvooos4WZ4Lo70N0eHHR RF9hza7b1GNeawl4z2OWPQ2gI4NsEfhkEKzL13wZk1ET/NCaUoMmjOaVspYRlQ5i0X44 ytZE7E3SSDEiOBWgET1l41+NGvhQK1Q0mYZc/ZavMaEvBtIGCZsQlAvZyzg88tvcJJYd /zm1B1rzAqH4kpylNQ/C/PqbydhD9TQxGxvcidhJtc7jkNqNcCTJWsJjQO0XNh3eEvr6 W2qJtWT97a8uvP8IL4Sjrltdx5moPRLll2FMQJVM1eLakkfGlH7gvCV+OGB8tJPxNlTG bdSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E0BYvJq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v23si4952342edi.391.2020.06.19.13.25.22; Fri, 19 Jun 2020 13:25:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E0BYvJq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389066AbgFSO5M (ORCPT + 99 others); Fri, 19 Jun 2020 10:57:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:52004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390143AbgFSO4w (ORCPT ); Fri, 19 Jun 2020 10:56:52 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (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 732882193E; Fri, 19 Jun 2020 14:56:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1592578612; bh=eBjUfeB8mo2ipYhlT9r1QU8k3Cxn/HX8rykQMP0iTnE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E0BYvJq4PKy7jO/2bp+we+W48+U3qEcz8rNEeqboBPPHAL8tpNjFACFZGCIxZoN6y HZyb0FteI2dYwlWFO05oqeI0RJU+eY+Rv0TLrn5aITgIQ0bHMJ5/QRAdyjVSTxbFMR 9LkdmMJLBF0OtzHQUL5OCbYnmsUDDGL4cuiARWB0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Andy Shevchenko , Mark Brown , Sasha Levin Subject: [PATCH 4.19 058/267] spi: No need to assign dummy value in spi_unregister_controller() Date: Fri, 19 Jun 2020 16:30:43 +0200 Message-Id: <20200619141651.658299249@linuxfoundation.org> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200619141648.840376470@linuxfoundation.org> References: <20200619141648.840376470@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Andy Shevchenko [ Upstream commit ebc37af5e0a134355ea2b62ed4141458bdbd5389 ] The device_for_each_child() doesn't require the returned value to be checked. Thus, drop the dummy variable completely and have no warning anymore: drivers/spi/spi.c: In function ‘spi_unregister_controller’: drivers/spi/spi.c:2480:6: warning: variable ‘dummy’ set but not used [-Wunused-but-set-variable] int dummy; ^~~~~ Signed-off-by: Andy Shevchenko Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- drivers/spi/spi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 88a8a8edd44b..0022a49797f9 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -2305,7 +2305,6 @@ void spi_unregister_controller(struct spi_controller *ctlr) { struct spi_controller *found; int id = ctlr->bus_num; - int dummy; /* First make sure that this controller was ever added */ mutex_lock(&board_lock); @@ -2319,7 +2318,7 @@ void spi_unregister_controller(struct spi_controller *ctlr) list_del(&ctlr->list); mutex_unlock(&board_lock); - dummy = device_for_each_child(&ctlr->dev, NULL, __unregister); + device_for_each_child(&ctlr->dev, NULL, __unregister); device_unregister(&ctlr->dev); /* free bus id */ mutex_lock(&board_lock); -- 2.25.1