Received: by 2002:ab2:60d1:0:b0:1f7:5705:b850 with SMTP id i17csp956632lqm; Thu, 2 May 2024 00:18:10 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUo0ic+RjPx9Pkj0FVKkVYoYKdGCCEq0sGqvMfWUE4RB5oxCelsPiiIVSCHGTm8Yd1T0D4nQGcOh1TpKUAZU4Eg87bKbwG8YfCi6MMTtg== X-Google-Smtp-Source: AGHT+IGUuPj80LofsxWICQYwAxZ5Ie8Ey3z0VozvzzXEdvodeYtpuYoWMl4k/+ultjHdUeOIWIDD X-Received: by 2002:a17:906:26d7:b0:a58:86c0:1275 with SMTP id u23-20020a17090626d700b00a5886c01275mr3231919ejc.30.1714634290055; Thu, 02 May 2024 00:18:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714634290; cv=pass; d=google.com; s=arc-20160816; b=O2+MZuj3bDCuc0gaxiIpuKtuWT17YVKZoIUyxM/d/s0u0qr4YTY7/wDfS3i2HuyqfW aep6cv7vkWM+lm6YkpP8iHcD0ecXQ1R5mMZz60gZpP7VlAr1BE37xkFe7rRmAYdPnPbj AnZbkppygNvrHsSQa9kw9Fxhsn56MJrlO4FgMkeVLwkH26vMvz5Y1hJrkXNyj1BxfdPK pOl4Ezf1vengE8wZv8D5SciF7Hz5JA9k4g8VolAK3QvGqX0693LtPp8OHySwPfYhlZ6F 8QH02lO+xV0CUTr9DG8pyzWXd2v08zpggaXs634uf7ThGTyGigfGl5et4k7rXR4Ot7uH +vcA== 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=LlaT5bD40K8Es+Lwr4CauZKfOb6DIW6nfa6Cg443TYI=; fh=ZgO28eZPKxynVKDME8lLAjkNqdTLBLEGFGbsDjbnjkA=; b=mBJtqOiGF4TYrAaTjm5K0KhEps3ph7yeVMAubIaU3RDr7iTokITXtsf35axsP0eki4 TjimL476eahYthAZTvC3eYoEfUYBFX7e+87z5F6cRkV6oyoE1rCnzbsRM52FOeoehruc gvXO8JOZ2+j+QhI7VFRul6BhEfu1JTkehU36OGUgZzueFJ4nFxVlbZ5+dbFczSs0Sujf h6MPLlh2YxB0nuH/a2fU1/0Zg1oMe9tz4pFhFQ6fkJNSYZalilmPXtOMWOG2GvVqDf3Z NYUFW7HUjMgQiZOCceO321uXbYVn+Vaj0qKxY15WI1DTdOiZyLPJiCdE5GZk1nyg7CrW sKbw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gN+fT53I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166041-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166041-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 kl24-20020a170907995800b00a524d96b9cesi216959ejc.11.2024.05.02.00.18.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 May 2024 00:18:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-166041-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=gN+fT53I; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-166041-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-166041-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 BEBD21F21F39 for ; Thu, 2 May 2024 07:18:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3B653225D7; Thu, 2 May 2024 07:18:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gN+fT53I" 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 52EF72032D; Thu, 2 May 2024 07:17:59 +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=1714634279; cv=none; b=sgaDy/vYPD9y9YEdpBaVqON1hXWY6ktlRtIjgLMBbRbntAWHWpGl1ECy9+J1Ly0s/bXgEEtY0abSXy4Z13LtpkbTiuOApq4D4dFd5ZCWW/ACYTmRa3EWZy9wZXh3luCa/iuot6ceSxHVsW4Vby9SzvEeDzY7GcCAV28kslQvTTg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714634279; c=relaxed/simple; bh=GKVkaZSZdTJ1ZSoNC/bu+eyVkUGbSrKVfeyYCZywwhI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UwJk2RL9E8cV0kqjL345xvbDJcH6erC0JQHo+gCNGnhCzd/TBHkDsXsc6W7pWx6aDvxzo1LaQIFI/9x+nFlS1wI4g2ldev8UJSPkMNJuMkrA6OkyIWE+e/rfjsvAmKLz5WJG/M6tceIaPieUZVwaizvb6XtUBKxE8iRGNTycWgg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gN+fT53I; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE876C116B1; Thu, 2 May 2024 07:17:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1714634278; bh=GKVkaZSZdTJ1ZSoNC/bu+eyVkUGbSrKVfeyYCZywwhI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gN+fT53IhX0Um7069irc19JXE58aEy2S2UWaqUw+4RquL2cNYVSw8NnDyNSt+/yq7 F/AtBIjOL8QdKS/SJfK4wb2Tiqlv1kA7W+itZZQhzAVXQUF1jZ87+a97p6yyfbYSmp SEm8GU845LER13PopJEqEJ5PJ92kgATndYi7/Rr4zDNQLNktsjc+UhLttMDOs5BB91 sCyGQRhYzZ0hztg6Y4tuZooxP5raHEqzAZkuxJbw4zjaMfDDwH4t96tX2vbkZnc5Ez ceZ5q+HJhFxrFicUxbTUqEb65vWKu0YAZthBK/bXmC3WV7HH+hguLDZhWXzbFSWwsi EHQL/Tyom4JSw== Date: Thu, 2 May 2024 08:17:51 +0100 From: Lee Jones To: Florian Fainelli Cc: Andy Shevchenko , linux-kernel@vger.kernel.org, Jarkko Nikula , Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Jiawen Wu , Mengyuan Lou , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maciej Fijalkowski , Andrew Lunn , Duanqiang Wen , "open list:SYNOPSYS DESIGNWARE I2C DRIVER" , "open list:WANGXUN ETHERNET DRIVER" Subject: Re: [PATCH 2/4] mfd: intel-lpss: Utilize i2c-designware.h Message-ID: <20240502071751.GA5338@google.com> References: <20240423233622.1494708-1-florian.fainelli@broadcom.com> <20240423233622.1494708-3-florian.fainelli@broadcom.com> <1d1467d1-b57b-4cc6-a995-4068d6741a73@broadcom.com> 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: <1d1467d1-b57b-4cc6-a995-4068d6741a73@broadcom.com> On Tue, 23 Apr 2024, Florian Fainelli wrote: > > > On 4/23/2024 5:00 PM, Andy Shevchenko wrote: > > Tue, Apr 23, 2024 at 04:36:20PM -0700, Florian Fainelli kirjoitti: > > > Rather than open code the i2c_designware string, utilize the newly > > > defined constant in i2c-designware.h. > > > > ... > > > > > static const struct mfd_cell intel_lpss_i2c_cell = { > > > - .name = "i2c_designware", > > > + .name = I2C_DESIGNWARE_NAME, > > > .num_resources = ARRAY_SIZE(intel_lpss_dev_resources), > > > .resources = intel_lpss_dev_resources, > > > }; > > > > We have tons of drivers that are using explicit naming, why is this case > > special? > > > > It is not special, just one of the 3 cases outside of drivers/i2c/busses > that reference a driver living under drivers/i2c/busses, as I replied in the > cover letter, this is a contract between the various device drivers and > their users, so we should have a central place where it is defined, not > repeated. I have always held the opinion that replacing user-facing strings with defines harms debugability, since grepping becomes a multi-stage process, often with ambiguous results (in the case of multiple definitions with the same name. Please keep the string in-place. -- Lee Jones [李琼斯]