Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1019868rdb; Mon, 19 Feb 2024 01:15:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUoW5dQRnhJmNXtRflXgLLuxvHoXcZIJiMecanPHiVSqeDaTtqa+YQ53iLHyKxELTkrhFgj4n7DXFiOEM/w42eQWBa4HlGmU6WeJhNjfg== X-Google-Smtp-Source: AGHT+IEyJqWF5km2Nn/LfZxt6DdUVhV8T1ktjsY0FPlsefrNs8c1jMvFebdZUbUCr8xtLBA7tbbr X-Received: by 2002:a05:6870:d60e:b0:21e:ca5a:b75f with SMTP id a14-20020a056870d60e00b0021eca5ab75fmr2939878oaq.44.1708334139622; Mon, 19 Feb 2024 01:15:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708334139; cv=pass; d=google.com; s=arc-20160816; b=i7ZLRPzMIOg9dj2gP7u8QWdoINm5LEKYmi7Q+lVG00MXIEZOOtfqybzzLAjw4WlfLr oTH9fFRj1jyKzHWy1amsq0LDrrfEOQugEstsWBXrI9H6N/rOq4GATWkBjU7E0sOKbBRQ YfE1EsVgpKCHY5Ry9XSGjTc6xf4Jeaxlz1Tjdro/i5uIC+w7n1LsSrMUCDup/sctI9JW phQSrvLL1vmPYbggnCmeMi9tpAW66u/+CzzF073cZ63Kmj5wj4MJNF6Kkm9MEkIOFLkh x1cHH+6N+TZCU2pm4zIbHnCjPv0ZU7O6FsEWyJBqAjG3uhOJAiVDWktMq6NN9QztttON 1ebg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=zDq6FINDMaFGYuNVYi5cQ8RLerVp2ttENFZShr1EgNo=; fh=FmSa307suzGTQV88lk3qB0NcNxRx9C9l3omo4ry3/3I=; b=nhkc1JEC1SKr+iA+UdgP/LANHlgRLaWigz5GIQk55VqQhV1bZHNRCqBzCChjge9tCl zDVeoH+DBHlsbcr5DwZnwIWYskfamls3AKbgwK2FbXEBVGDDDHhskFZP+BoV4nCAtORe o6WHKOs0tR6+2x1RUp5dW7l4sRa+2K2c3HGgDbx64UEo1TMMcnl5IM2PbftsRcRWNAlo HGnvWnv9j7KJsIfmAeMXE8LK5NPi/DSu4945F6GiKnmGBRApgbqFHGrpM7MNMT39pxNO 199OfJsoEEYSA+wLGdJiNSBnut3EOfGR7qIxiOmzSzW5wWPUSxFOQFwChn8GV+GyZAZn /HmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HS1FsVtG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id l193-20020a6391ca000000b005dc48827a3asi4177546pge.227.2024.02.19.01.15.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 01:15:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-71013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=HS1FsVtG; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-71013-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-71013-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 4DDB6280ED0 for ; Mon, 19 Feb 2024 09:15:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 042CF22EF7; Mon, 19 Feb 2024 09:15:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="HS1FsVtG" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5325C225DD; Mon, 19 Feb 2024 09:15:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.8 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708334132; cv=none; b=nqQFxPwXmTGVrNqE81HZcP/RY103YbOm/e2ADpLybL44ukFQGIRiy4LnzvTNbKbefqZvlGDBNwr71eJTjtzv7qjsy/IO6dyHXZ7R8OJ2UYEfbJkPPWXtIxdDF+jOwFf3/jNTAhJnFVzo0JjaCA8hRdpEwBt95/UmDPQjVf0kMyI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708334132; c=relaxed/simple; bh=2IsOrnwrUtDaBBPgkkbsCmwW81iCZ5GY65RJOKc5n64=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=HPO2orar2DgnHFBvKHHONe69dIWaOyGZ0uJVSJiFabQlojLaMZit2kOFpvncJ62vtVZ+1H7ZVJisfGlEnasueXNPaq6bxVbrvcv4ZCQGmlOe+BAf+XL9R0AdqNzn5nk48d3syh2GAgv+enrZDaGahL38Kl5a8VYO5vPAQR7kNzs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=HS1FsVtG; arc=none smtp.client-ip=192.198.163.8 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1708334130; x=1739870130; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=2IsOrnwrUtDaBBPgkkbsCmwW81iCZ5GY65RJOKc5n64=; b=HS1FsVtG2/jB4fYuY3fWXAK45NdotxuKx0woVkoVpOyNJkKALI3MrWQG YZY9OMfniYNZLtFYms9kEZYMXv6BegWhx9O/hheKWr089ERYlYq/mmFlB SlwxygBw75ZaEwuOUrqAJQv+rD7/7PLbJC2FNrDeB7OhaBcadCC7Wuf94 +N53CGht3VtJKnY39iqRsqNwj06shfUV+BXkcqtsb9RqVgM3hpeerATn4 Vv/weuXak8WkEJF3Y1BSB66PyFmZfXYpNSt+cz2AiKWx4UteG1anHxzyY sL3D3tvwgpnW6HxkMBEURGTTClAZI3iJgzB7ns26XA+om0ASbAnysNL6z Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="19933946" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="19933946" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 01:15:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10988"; a="936260979" X-IronPort-AV: E=Sophos;i="6.06,170,1705392000"; d="scan'208";a="936260979" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Feb 2024 01:15:27 -0800 Date: Mon, 19 Feb 2024 11:15:24 +0200 From: Raag Jadav To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Thorsten Scherer , jarkko.nikula@linux.intel.com, mika.westerberg@linux.intel.com, andriy.shevchenko@linux.intel.com, lakshmi.sowjanya.d@intel.com, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 2/4] pwm: dwc: drop redundant error check Message-ID: References: <20240219033835.11369-1-raag.jadav@intel.com> <20240219033835.11369-3-raag.jadav@intel.com> <4cl5y62fv4jezk7i3cacv5ukzwyp66uflp3upg4czy4dp7g43v@cfbm2seewpst> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4cl5y62fv4jezk7i3cacv5ukzwyp66uflp3upg4czy4dp7g43v@cfbm2seewpst> On Mon, Feb 19, 2024 at 08:27:43AM +0100, Uwe Kleine-K?nig wrote: > Hello, > > On Mon, Feb 19, 2024 at 08:11:00AM +0100, Thorsten Scherer wrote: > > On Mon, Feb 19, 2024 at 09:08:33AM +0530, Raag Jadav wrote: > > > pcim_iomap_table() fails only if pcim_iomap_regions() fails. No need to > > > check for failure if the latter is already successful. > > > > > > Suggested-by: Andy Shevchenko > > > Signed-off-by: Raag Jadav > > > Tested-by: Jarkko Nikula > > > --- > > > drivers/pwm/pwm-dwc.c | 5 +---- > > > 1 file changed, 1 insertion(+), 4 deletions(-) > > > > > > diff --git a/drivers/pwm/pwm-dwc.c b/drivers/pwm/pwm-dwc.c > > > index c0e586688e57..7dbb72c80ef5 100644 > > > --- a/drivers/pwm/pwm-dwc.c > > > +++ b/drivers/pwm/pwm-dwc.c > > > @@ -51,11 +51,8 @@ static int dwc_pwm_probe(struct pci_dev *pci, const struct pci_device_id *id) > > > return ret; > > > } > > > > > > + /* No need to check for failure, pcim_iomap_regions() does it for us. */ > > > > IMHO this comment could be omitted. > > I like the comment (and even asked for it). Is it really only me who > doesn't know that after pcim_iomap_regions() calling pcim_iomap_table() > is unproblematic? Neither did I :) (Check the v1 discussion) Raag