Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp236132rdb; Thu, 30 Nov 2023 03:36:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IFUvlg2s8ZA3efrLsK/CSUdVyKo5PR14SoS1r0TKVZjDhsV9MlFMv5tyc0Qn9mqnbE2H1TV X-Received: by 2002:a05:6808:1286:b0:3b5:69c2:59cd with SMTP id a6-20020a056808128600b003b569c259cdmr28207609oiw.25.1701344163786; Thu, 30 Nov 2023 03:36:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701344163; cv=none; d=google.com; s=arc-20160816; b=GiPCmfQ1kHh1lowXbicbcIWoFjkCwDBO8zgLgSoZgTtUoscsuPWS8o+WiawEU9mJ+t KZ+7ajDtn5tyzSPjnfF5Sd235Deez+60twnrF+tzmJksV9O0b4JctwsIn8rfddVIfA3+ de6eQIEcOHzJvd/muZA0S3wu6y4hmmTjO4LpH0ASCE6qWLXg2jKHwsI64WuHiJmP4s3P kXh/zAD/WB/JENrdaaqz9/XXwKd4gF48t+AuL5HZLb2yGQzHTeGwbTPHbX5lxp57S8AB Fva/09Ptkqdyq7L3WiJnPaj//GfxOFFcvEcy0/qOk2P8q+UqQtTwlMHrPqmG3FLE7fjx jiMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=iccwvBqc/TY1rnLPOZ1cXJDHytZ2HCYSorlZDgQjl44=; fh=gdFw9tkhGlo6BCMzI4mGx3o8aNsJZEQxP72z6/lXjGE=; b=i4l8hoSOxMTjxlJ/l3cuFnHNsUaIDGPSUlzDuKisOnoKrOYt8O/09krHiv0Ap0CdiV BXCoKXPRMp99VBf72YJLg81oIe6GUHUGBsk8ZB4YVoJNU+ylTKHCF0Bssrr3C2wME7g7 /Ib/j0/nRuau/s/HuiAXKkyv0yRLGvOTALJ1sSwIPIZ4rE2HHOBoxNw20Q8RA9M3CJfr S+SxEgMr+hmxewUFIZbi2SwEyraQbeqmXsMizsyv9cWHsicrrpLtm9AwY2jgTwXMc2p+ oLeIkeIvWGbrpRP54oesaW4lWutkjPz5GfN8gwREEaEKgZPVblSAwhYH7SP+WeJrKcod fx/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZWEHStW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id q65-20020a632a44000000b005b9b45ba3c1si1078740pgq.563.2023.11.30.03.36.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 03:36:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KZWEHStW; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 05D898077564; Thu, 30 Nov 2023 03:35:31 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345156AbjK3LfQ (ORCPT + 99 others); Thu, 30 Nov 2023 06:35:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345139AbjK3LfP (ORCPT ); Thu, 30 Nov 2023 06:35:15 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECCB410CE for ; Thu, 30 Nov 2023 03:35:21 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AAB79C433C8; Thu, 30 Nov 2023 11:35:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701344121; bh=aXMCvRbkbAavtJM/apaYExo/mAL/W5+YtPx7xBZtPGs=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KZWEHStWGFkUOVCoEGkX84XImKjl1P+rgEdzoDX8HIICyn1sEoHm3cmuEsjw/cpzP qV4LyjM3aSC+fe9S3lqQZ5i8CAoS2grjDwhKd5kxqEGmfCODhCjNlRu+K/L6bY7Kaa 5pvhgEleJ/nCcMEBnvO/12CxNwQq8i7Px1PyjYbFIDNsseZ7/nk66yxUez5R4uPHkl +8lItc8llCIH4kcHox3D3BS8olQVVsBQejD3IAVjUqXzyEAQt7wC1Jm63uFTAFgnbg xU8aKWzAxbWSv9rjaXAlr2SfsCsmAaiIbTc1nW4qHeFZqlggD3NMkD249Q83mh0l/h 3aOhAU/Fd4reQ== Date: Thu, 30 Nov 2023 11:35:17 +0000 From: Lee Jones To: Andy Shevchenko Cc: Jiasheng Jiang , linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] mfd: intel-lpss: Add missing check for platform_get_resource Message-ID: <20231130113517.GJ1470173@google.com> References: <20230609014818.28475-1-jiasheng@iscas.ac.cn> <20231127085356.GD1470173@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Thu, 30 Nov 2023 03:35:31 -0800 (PST) On Mon, 27 Nov 2023, Andy Shevchenko wrote: > 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? You have to send links when you say things like this. Last week I had 1000 unread upstream mails in this inbox. -- Lee Jones [李琼斯]