Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3014140rdh; Mon, 27 Nov 2023 04:51:01 -0800 (PST) X-Google-Smtp-Source: AGHT+IELIrZcuUQmBjG6ygBT/XZ91Tiu8MaRdiSEP4epNju0bxB6wYyeD2xVHwrEIGPiE4eWNWCq X-Received: by 2002:a17:90a:dc08:b0:285:6622:ed1 with SMTP id i8-20020a17090adc0800b0028566220ed1mr20453167pjv.10.1701089460908; Mon, 27 Nov 2023 04:51:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701089460; cv=none; d=google.com; s=arc-20160816; b=UmvommH4FtY8u79zKFl+Dmbbj3XvK0a9WnaGSBtCrZdEVUJ4qdIbk0FXr0d+nQG1hh bv9GsjYn5II53ertqMLpLaZ1qeV+5wGZUxPC/T773N9thilMmM4t5f3IC456xTvFfvoR AeFUXBQ0Dfqrzx6I9s9lfnBOEZHnGopUhEX9J8IY8C2qqwTGfymvDoYD6nhMsu/+o0jG D8hN/wht45m4xXfyNB3i54FyqK5WN8WSLB/f7RSm/Qx5oWQg9bdPAyDmFGFu68bR69kc 9JnmWiYGWOiP+XlrtJvpTBfYToiTsLAWU1sCr3R/wQrFT+efxpvdog06izCUPWag3iFL qwmg== 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-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=GmcYVVOrR7zUq/9yEEF7lWMCcsfHvlVYmYOqd22gg2M=; fh=x6FMh1qKDntykE0pVFjS2nyFbKE4bMPjuPE0iKD2Tc4=; b=0Y0i/3xiJa9NlbYAH+c7MSuGtRv4D5AQu63qOZOyDW5xlqWk+n7bUkSsRLw121vLCy 6ItoWFXLn4WhqHTX68VpYpZNLqCIqFaSp8vYsT+PSOehOKbMVwpQmqLTWgsd40iTUbVF JS2ksgjDi497yFtkMGxc3oGQO2o78oxW8wL5982NLKVLjgqSsjb2LSRnuc+MnL22ct1J N1drqMoepej3SGXdtBHeB6FpGx64wIQ2YFQwiDr9L9821li8jteSSBto2N11IJ4P93Bg 4XbCReowmjFF/G0J74ekuDcbxJ7SKhq72rtjdZQqZcsr3DxbgKOmBFDrpPE701ZzCf16 gbPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="EQ/UrXlY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id il15-20020a17090b164f00b00285a20806aesi6059889pjb.166.2023.11.27.04.51.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 04:51:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="EQ/UrXlY"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2B07C80BC10A; Mon, 27 Nov 2023 04:50:58 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233387AbjK0Mui (ORCPT + 99 others); Mon, 27 Nov 2023 07:50:38 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54686 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233419AbjK0Muh (ORCPT ); Mon, 27 Nov 2023 07:50:37 -0500 Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F54C19D for ; Mon, 27 Nov 2023 04:50:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1701089442; x=1732625442; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=aSRjgfFZERfpt1uNhcSIIvD+EE3DjlExYDVUjg6vshk=; b=EQ/UrXlYOEaAKYtEDiXq0Y2XHDYoF6HZzg9p5IOr6E9jzN7mhksdNzgM 3KdkWtYH86Yg519KgwYR3TeeNM2iU71DwtWzuJS6giAIP3lmUIRJ9YiBI +kNAD+eQM+Yqf6xVz4E22iCXWX1ZRqCcENCHRyuMpC4fHf4+8wBk+BdHG HSfBf0NoeiQv+3eH5y2m8gSvQRYBR8vgxNGpBwmakupbNpMz2Fv0GM0gH 9N7Cg1/l4EnzbhQux1/dDFYxohvs0hfQkKNqVl57WiTbw1fcJW4qUmPK2 Op14Tm3tF6oRdMku46w+cUyAWGyPh56EnMy6jT9eXfUVLE4NPknX1fc/u A==; X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="457028034" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="457028034" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 04:50:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10906"; a="1015554098" X-IronPort-AV: E=Sophos;i="6.04,230,1695711600"; d="scan'208";a="1015554098" Received: from smile.fi.intel.com ([10.237.72.54]) by fmsmga006.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Nov 2023 04:50:40 -0800 Received: from andy by smile.fi.intel.com with local (Exim 4.97) (envelope-from ) id 1r7b4P-0000000HTWN-462j; Mon, 27 Nov 2023 14:50:37 +0200 Date: Mon, 27 Nov 2023 14:50:37 +0200 From: Andy Shevchenko To: Lee Jones Cc: Jiasheng Jiang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource Message-ID: References: <20230609014818.28475-1-jiasheng@iscas.ac.cn> <20231127085356.GD1470173@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231127085356.GD1470173@google.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 27 Nov 2023 04:50:58 -0800 (PST) On Mon, Nov 27, 2023 at 08:53:56AM +0000, Lee Jones wrote: > On Fri, 24 Nov 2023, Andy Shevchenko wrote: > > On Fri, Jun 09, 2023 at 09:48:18AM +0800, Jiasheng Jiang wrote: ... > > > Fixes: 4b45efe85263 ("mfd: Add support for Intel Sunrisepoint LPSS devices") > > > > This does not fix anything and just introduces a duplication code. > > I would like this to be reverted. Should I send one? > > Checking this value at the source of obtention and providing and earlier > return with arguably a better return value, all at the cost of an > inexpensive pointer comparison to NULL doesn't sound like a terrible > idea. In general, I agree with you, but the cases similar to this. Why? Because memory resource retrieval and remapping has a lot of helpers, some of which are enriched with own error handling and messaging. Yes, we use devm_ioremap_uc(), which doesn't give that (yet?). However, it will be more work if we, theoretically, switch to something like devm_ioremap_resource() in the future. Hence, I would like to have a common code to be in common place and behave in the same way independently on the glue druver (PCI, ACPI, etc). > If you were committed to the idea of removing it, which I suggest you > reconsider, I would insist that you replace it with at least a comment. Isn't what I have done in the series I sent last week? -- With Best Regards, Andy Shevchenko