Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1159771lqb; Thu, 30 May 2024 01:56:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUzl/Y5SxBI1k5lRPiYZZwBOI98Bn4Z6jgRRHe6WAh2qb9yUIOiZ8tm21PousAL643hX5CW1xHNFPowlNbX/FZtUEP20sZhNfcU67xqCg== X-Google-Smtp-Source: AGHT+IErBqRovIuHzS7+1iAHBJEYCUlXIWzeXt/Xoo13UYTUiyeGooQinHKnAZlmjyFoyQFGX7c/ X-Received: by 2002:ac2:5f08:0:b0:52b:797f:b21f with SMTP id 2adb3069b0e04-52b7d47a923mr932749e87.51.1717059399714; Thu, 30 May 2024 01:56:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717059399; cv=pass; d=google.com; s=arc-20160816; b=rHzSaPfkTIMtEzyeseUArywgox4CulcR+tJIsoFKajiOiziuyRcYWMMCC8g7gWMWsl w+vNKIjOZv79WyU1TaAJvgcXy7X3KJSFxhKjpVu1c/or9WaB2OsQWFtAE/o2ZqH59dKF rxkhVzhqfdiB/3R/K8didJs4BcOHd6VVIrPw2GIDG+TmTsz5g7ypdaWb/X3VNxRVu3Gm MJAfvBkuT3SHhCC1urQT3e/WEXC7Sy6Gdr/NvmJax2NoVhdu2zOlXdRoPPXOeGYKA1g4 3UblIHPdFNRyDi8aoC9ZdL01DqjtvMWsdJvkd5KF7xorSVgmMuPk2KCgL4+DA8fctm24 lXUg== 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=JhcPoD9MIuNcyr7HfT8OWrDhIB6jSeL+pSzNsT+ei5I=; fh=KUuPOpw0IyM8pbeqiieZ62jf/DwruDIjwoIl6lgdu1o=; b=ZZYRxCF+rwZGKCQzOKGuCELqN3GIGUTVPBI6FxYa7/Ji8j89Fa5xAx87lbInCfQW1/ i98mt1SUTDz299voRpg/gLVxCXso15aMDhi2dmRfNnq3I8gJ/S9rxWo6RLiPCPmXp77c Ev+1kDfp1xamMxlxJclTgZFUJiZvWjjFegm5j676RbuNMm/8MqGetTR+vzdutGY5eGBS ARmYkna+JlqcBHTdyC17ESt2qhsEEMfGNm9ZfFet2OJfRgUruABlC/WlCk7BsJqf8pam GMdi2mUg6n93ORIjUNxDGEfp6t4AwA6JXQKf3Yf8ApBSuzhYqtVkUC29TQ2nt8Mfg5Nf ruZw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MrDPeC2x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a667853d127si18206966b.215.2024.05.30.01.56.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 01:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=MrDPeC2x; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-195098-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195098-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 6AB921F22522 for ; Thu, 30 May 2024 08:56:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F55E74064; Thu, 30 May 2024 08:56:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="MrDPeC2x" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 72BB76F301; Thu, 30 May 2024 08:56:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059388; cv=none; b=VcVybITCTwQgDal5FhlCFXx3rguDG3Pq3KIMziBMArBd94PyjXXbFzw2SKkT0wgMMwZUWLYWOKKAZH+e8Q/3nrJbeAvrszJZWFkgjxHoZOC/GaTWsoQ14EkVf0rYQvkasn4q/m22s839HFLd1VEROKIX5CfCg7FtXAenOnNBPfQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717059388; c=relaxed/simple; bh=fum/BPvWuDHoboZhfPtwEwo9cUCkLkyCgJcO+Gf/NjA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pwi6T4Jb12nZ0Xrz8CyaasEanfmkrQLXYPMuPs6hrDzjpYHbPFcw62KSgu9cruCv4AJjogdbqmfiZqG8c5+KfzLTZFD0FLye65RRhWY/xZKzj/wF5WsdwKki151BUb/bskXIY8B5E6Tiiz4zzMo7wAPdfTKIj+TevZtPsinLkaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=MrDPeC2x; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ED5B2C32786; Thu, 30 May 2024 08:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717059388; bh=fum/BPvWuDHoboZhfPtwEwo9cUCkLkyCgJcO+Gf/NjA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MrDPeC2xAruMf0dsLELM9FoeYWMHVJCNCBGH8lb4co9Con9cFEHZl3zEt26HxOX8T wv5V3SUq47QQghlMVGMwD8CnghcgGDPdi4zmEr9c8WuXg+Lln3jXBRoQipd/aGL8ZP eJoNUKhq1dJZIPdSRcI3plFu8KT/4nF7XHpDS6lgqYAfmARlrH7Eic/3Bwb4nq5PPE y5vEzRHuvWd49tf3Qhq7Qv68aDHDVq8RIXizIQqPSxm0Q0oXvE2VZSIih4F0VgfgCB MU5L1amHuAmAPgNUsKyEi88dsPNotrHJwnerM5k+0fwZy6TOXzgQzXdI4xW6fMZ1eA gafO4//xKUfIg== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1sCbaG-000000004kF-0kIr; Thu, 30 May 2024 10:56:28 +0200 Date: Thu, 30 May 2024 10:56:28 +0200 From: Johan Hovold To: Andy Shevchenko Cc: Johan Hovold , Lee Jones , Mark Brown , Linus Walleij , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Liam Girdwood , Das Srinagesh , Satya Priya Kakitapalli , Stephen Boyd , Bryan O'Donoghue , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [PATCH v2 13/14] regulator: add pm8008 pmic regulator driver Message-ID: References: <20240529162958.18081-1-johan+linaro@kernel.org> <20240529162958.18081-14-johan+linaro@kernel.org> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, May 30, 2024 at 11:46:12AM +0300, Andy Shevchenko wrote: > On Thu, May 30, 2024 at 11:14 AM Johan Hovold wrote: > > On Wed, May 29, 2024 at 11:02:57PM +0300, Andy Shevchenko wrote: > > > On Wed, May 29, 2024 at 7:30 PM Johan Hovold wrote: > > ... > > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > > > > +#include > > > > +#include > > > > +#include > > > > +#include > > > > > > + types.h > > > > This one is already pulled in indirectly and I'm not going to respin for > > this. > > > > > + asm/byteorder.h > > > > Already explicitly included in the code you left out. > > Is there any guarantee it will be like this? I don't think so. That's > why there is an IWYU principle to give more flexibility of reshuffling > the (core) headers. And I believe you know that we have way too far > dependency hell in the headers in the kernel. Have you seen what Ingo > tried to do and what the potential achievements are? The driver is using cpu_to_le16() from asm/byteorder.h so the __le16 type definition will be pulled in. > > ... > > > > > + rdev = devm_regulator_register(dev, desc, &config); > > > > + if (IS_ERR(rdev)) { > > > > + ret = PTR_ERR(rdev); > > > > + dev_err(dev, "failed to register regulator %s: %d\n", > > > > + desc->name, ret); > > > > + return ret; > > > > > > It's possible to use > > > > > > return dev_err_probe(...); > > > > > > even for non-probe functions. > > (this should be "non-probe deferred functions") > > > This is a probe function(), but as I've told you repeatedly I'm not > > going to use dev_err_probe() here. > > Yeah, I got it, some developers are leaving in the previous decades to > make code very verbose for no benefit, no problem. And some developers write unreadable code just to save a few lines of code. I prefer clarity. Johan