Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp987682lqd; Thu, 25 Apr 2024 02:43:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXPPGMLkkLN3jk3H04A18UvT6FkdGj9hRRFx9Ysv9FNSmWKzikNZOKelOBMUARjaqVLgZpwgW4UHDURjkPhv6rvRjnf5fCDzgwYVuPoag== X-Google-Smtp-Source: AGHT+IG/WWLIYXmntgIwhfcyYtjmc34u8bT8PmTRgnxQ1viI9F6D3+WAgykIZQv98fbiHbWaioSk X-Received: by 2002:a17:902:f551:b0:1e4:3321:21e9 with SMTP id h17-20020a170902f55100b001e4332121e9mr5762105plf.48.1714038203346; Thu, 25 Apr 2024 02:43:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1714038203; cv=pass; d=google.com; s=arc-20160816; b=lVSDRFhRqOFURvPmRaYG8FbQ83bnLJa6AHIx2gTgUzDWAowLIgpE6OhuimSfEtgVz1 vRBccivdiMgR/Fqgx7Rrj2ckggMv8kkaHSY6+hj8VoNoM3U3UH4aq5bLcTLYCYmazEJe g7ijeorqKmi+O/YAzISOcvja9dssfW+0Z+vB3ZztaCwQGwVrRpO2QwuxHp2+BzTwsQ/k atVYRB3hI6zrBV+6j+D6MUPC4AY2Do8Nqr6ODv7n9aNFhD4G+UDKCakh4n8qBAZssd8J BQ/c8PTWUy0fySoWhEaZBjHJgtc8eF6q7IvJiUw5zWCDK1ECg3rtP65FbUaRfjibCxE9 aZOw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=+B3ACTFE4twpgEJhUVnjfgKf7brg8WkMIxIWB7hLpR4=; fh=9QdhZd+KwBL7sNA3Yei7huXvcRPZiI0xwZRcOLecWtU=; b=TzEoKOb6niCRy0kT1VWB1woVABGxoxhcdqOyUIrqoJII4H3imB7pea5YtFjTTw/icr STAYusis4ZJN1guYXzdYeR3nmvTxjpja1M0AcZ+K/ayeo5Phd9ALH1i4SO0SKnu+1UBx SVAJiagnIZNdui0yDk+Sd5MRtFbkl9k07c7FpdThudZjsX/abhkbHyK1TsKRNFbGOdGm GplqTpjIUWeaHgLyA9e7/qSnIiDLV8zGfiV9GPd4aAdDodhjE/n0YYi0M7zfLYZclmbz AUHwEUp58zRD7hYChuzKstlQNj4MMfkPlDfVubQrHka06hDD6t5kLXiTBWRVNPylZaN2 bTeA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VzvRNchD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-158198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158198-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id l9-20020a170902d34900b001e5560d8535si12481197plk.442.2024.04.25.02.43.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Apr 2024 02:43:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-158198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=VzvRNchD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-158198-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-158198-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 26062B237D8 for ; Thu, 25 Apr 2024 08:33:22 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 874F47E59F; Thu, 25 Apr 2024 08:33:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="VzvRNchD" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.11]) (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 0358817BAA; Thu, 25 Apr 2024 08:33:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.11 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714033990; cv=none; b=L0fWWPM5KmzJsa11LgDCIoRnPBmCHIQgsn3+gn5nGpe0EKjCuLxsvbxyeuML+Jb+fcYdCeW9R/tMJOvU67pcNkWjhKMelfe+rJnbFf1E4sePaa7QhPUEfU/7LpC47NGM+2bUqMvDCa6cUaAc9XnuC/WXao1dP4g2W8uWBxMEJS4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714033990; c=relaxed/simple; bh=4DkN2l8gkUSZtinE2eNxNSMW88fKkz++DbovXDGMTsg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=CPs68sClRLdNOE/UWRcvrpFZglRObhDnJGwNPn+HSilDT6nbIdov+0AJIySFmyp49FMKdIjbaaAPeufbDw/g/1KbT7fLt97WGINDGOtpp+q4GABzh0kj9bW0bozzeWuAw1POc/45uiNmroKrU9eKjMSutaCkI1gjuiND5W80ruU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=VzvRNchD; arc=none smtp.client-ip=192.198.163.11 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1714033989; x=1745569989; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=4DkN2l8gkUSZtinE2eNxNSMW88fKkz++DbovXDGMTsg=; b=VzvRNchDHpLSqTQNohWtyFMkFuTpqawqbJF81oVYkOGmihz1c/nvZXTk ldwUHdP4SZdICVFjXJICoil+iIGVBAIRb8NfOuO8BFG/pOuCPwUKZzRxN DWnSMAAWsORORvzNmiLermBfkmbjyRi7kc+zVc2tNFQjOTH828JmTtJk8 Au2l2B0tvxzWRF7Z0aXl597tp9kwnbU7Rethz3xJeKn5BvNDASqz+zNCK z87YYS4OsHochgpxjZYMfUO6tckf66o2jY0ai95OxMg8JCjbg7GEb2lbb RSSPNT1r0FNGN4hTtLj2gOf1gPCj7N9zaqN0SfwgxftkC0cSVFS8IwXFr Q==; X-CSE-ConnectionGUID: fsroxyC0SIOpXgK9+60NyA== X-CSE-MsgGUID: 7FIHw7jBSaS5+n8crgn7qQ== X-IronPort-AV: E=McAfee;i="6600,9927,11054"; a="20317505" X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="20317505" Received: from fmviesa002.fm.intel.com ([10.60.135.142]) by fmvoesa105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Apr 2024 01:33:08 -0700 X-CSE-ConnectionGUID: uUcqACFWTmiIFBsib+QgvQ== X-CSE-MsgGUID: ORuMhv9RS1+iB5yeCRSKPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.07,228,1708416000"; d="scan'208";a="48253104" Received: from ehlflashnuc2.fi.intel.com (HELO [10.237.72.57]) ([10.237.72.57]) by fmviesa002.fm.intel.com with ESMTP; 25 Apr 2024 01:33:03 -0700 Message-ID: <59b7ba5a-14a8-497e-8cf8-53bdf4e8cb8e@linux.intel.com> Date: Thu, 25 Apr 2024 11:33:02 +0300 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/4] i2c: designware: Create shared header hosting driver name To: Andy Shevchenko , Florian Fainelli Cc: linux-kernel@vger.kernel.org, Andy Shevchenko , Mika Westerberg , Jan Dabros , Andi Shyti , Lee Jones , 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" References: <20240423233622.1494708-1-florian.fainelli@broadcom.com> <20240423233622.1494708-2-florian.fainelli@broadcom.com> Content-Language: en-US From: Jarkko Nikula In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/24/24 2:59 AM, Andy Shevchenko wrote: > Tue, Apr 23, 2024 at 04:36:19PM -0700, Florian Fainelli kirjoitti: >> We have a number of drivers that reference the string "i2c_designware" >> yet this is copied all over the places with opportunities for this >> string being mis-used. Create a shared header that defines this as a >> constant that other drivers can reference. > > ... > >> #include >> +#include > > Can it be hidden in the subfolder? > > ... > >> -#define DRIVER_NAME "i2c-designware-pci" >> +#define DRIVER_NAME I2C_DESIGNWARE_NAME "-pci" > > Oh, this makes all the things hard to read. > >> /* Work with hotplug and coldplug */ >> -MODULE_ALIAS("i2c_designware-pci"); >> +MODULE_ALIAS(DRIVER_NAME); > > I believe we shouldn't use MODULE_ALIAS() without real justification. > I think MODULE_ALIAS() is even needless here since this device is not added from another driver but loaded only for known PCI IDs in device table.