Received: by 2002:a05:6a10:f3d0:0:0:0:0 with SMTP id a16csp4803323pxv; Tue, 6 Jul 2021 09:29:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt1yva+pND0rkqjxMTPryyQsBfvrXaEoGy+Nid+pB9pWg7T4KA9NFWTnhcqWRUzcqioSRg X-Received: by 2002:a17:907:160e:: with SMTP id hb14mr8922904ejc.472.1625588987819; Tue, 06 Jul 2021 09:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1625588987; cv=none; d=google.com; s=arc-20160816; b=AupLaEjrzGfGTYTHI4b/tW4uNu7oCpb/+UwsjJ9KHkYJV2pj0c+UluC5/XX0iREOrH 8CRQ6WVpSOac3bYCkpJ6zVgi6NyeyPCa/WdtOZBYZKiKHv1FUrpoINrUEk1CuvCWW6iK LSsRPwMTPcHoFjw4xrjwHM5UXOi/3ccB2AqRd9JvoCgDuxgM8dyLMDIcn5X3PdmkX8yL +3Oey+AogKTkb3qDezWmXqfdoyC86jVPDbeCX+ZVpmDYxCThkoD3DNIFKw0W1YoveUxa aeCWQMp7n5ShgjxUuRjPp05ip0xfuZxS7fbrzd4e97wmjWWwfqvFVy8q1EZ2QykPbIDR jrkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=M0qmavuTuWQcnrGJ35QRdc5tGRWsslnRkvTvszGydMk=; b=kqxc/lNPJsCxJZI6qjwknY+E9QnfaRl37uEdjwYkGxTrhNvL1soDSL4/DGp2PN2vkL 073gs6SfrD9jZ7BRkbxyG177e05Wo2S0rM7Ar4+bODt9BwySJQUR+8kckT/Ah+kxzT5L 0X1qU6lF5JU3jKngzGjaxgi6KWXVIG7XxPXQpVq0ehefcPj4892RIIP0RgUlMumay0Kf 6OL73H1PIY96ukFXM6eFmDYX0H/Z1mYWvNkylSSkYRGBAYR8Xtyn071eLLsOAN7HnLGO 1epOJGlSQByijSW4UgQJzBH4vZusGQ6aSmllgqca7OCp+JUMCqiRgqU9LQGKJLJmBCj6 GRTg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si14917775edp.92.2021.07.06.09.29.22; Tue, 06 Jul 2021 09:29:47 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230014AbhGFQan (ORCPT + 99 others); Tue, 6 Jul 2021 12:30:43 -0400 Received: from mga07.intel.com ([134.134.136.100]:47991 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229935AbhGFQam (ORCPT ); Tue, 6 Jul 2021 12:30:42 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10037"; a="272994965" X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="272994965" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 09:28:02 -0700 X-IronPort-AV: E=Sophos;i="5.83,328,1616482800"; d="scan'208";a="563369725" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2021 09:27:59 -0700 Received: from andy by smile with local (Exim 4.94.2) (envelope-from ) id 1m0nvO-009Uen-1g; Tue, 06 Jul 2021 19:27:54 +0300 Date: Tue, 6 Jul 2021 19:27:54 +0300 From: Andy Shevchenko To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Colin King , Thierry Reding , Lee Jones , linux-pwm@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, "Rafael J. Wysocki" Subject: Re: [PATCH][next] pwm: core: remove redundant assignment to pointer pwm Message-ID: References: <20210706151133.33175-1-colin.king@canonical.com> <20210706155820.aiv3q6rxuer7kdco@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20210706155820.aiv3q6rxuer7kdco@pengutronix.de> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jul 06, 2021 at 05:58:20PM +0200, Uwe Kleine-K?nig wrote: > [adding Andy and Rafael to Cc:] Thanks. > On Tue, Jul 06, 2021 at 04:11:32PM +0100, Colin King wrote: > > From: Colin Ian King > > > > The pointer pwm is being initialized with a value that is never read and > > it is being updated later with a new value. The initialization is > > redundant and can be removed. > > > > Addresses-Coverity: ("Unused value") > > Signed-off-by: Colin Ian King > > --- > > drivers/pwm/core.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c > > index a28c8639af5b..35e894f4a379 100644 > > --- a/drivers/pwm/core.c > > +++ b/drivers/pwm/core.c > > @@ -846,7 +846,7 @@ EXPORT_SYMBOL_GPL(of_pwm_get); > > */ > > static struct pwm_device *acpi_pwm_get(const struct fwnode_handle *fwnode) > > { > > - struct pwm_device *pwm = ERR_PTR(-ENODEV); > > + struct pwm_device *pwm; I would move it after the next line... > > struct fwnode_reference_args args; ...i.e. here struct pwm_device *pwm; > > struct pwm_chip *chip; > > int ret; > > LGTM: > > Acked-by: Uwe Kleine-K?nig > > and if you want: > > Fixes: e5c38ba9f281 ("pwm: core: Reuse fwnode_to_pwmchip() in ACPI case") With or without above comment addressed, Reviewed-by: Andy Shevchenko Thanks for spotting and fixing this! -- With Best Regards, Andy Shevchenko