Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp108871lqd; Tue, 23 Apr 2024 16:59:34 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVURBF4qr0HkRdMi6XCdVosjgICwhMjU6++KukM/b7GKIzwDHG1NC1+pgUOLle0/Hw+CPk88ywH2O9zZnWqRv70IhM2X0bWewnKiBgfQg== X-Google-Smtp-Source: AGHT+IH1IwP4o6eqfpCaesoc6mEQWJ+U70b/4EERzjMAWnZa6lUFVsPpbWmdZd2hlwCFiz1TD4Nu X-Received: by 2002:a50:9ec3:0:b0:56e:57f9:8c83 with SMTP id a61-20020a509ec3000000b0056e57f98c83mr672454edf.19.1713916774528; Tue, 23 Apr 2024 16:59:34 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id v19-20020a50a453000000b0056dfbee4e73si7759235edb.209.2024.04.23.16.59.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 16:59:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-156037-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156037-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 426A51F21E08 for ; Tue, 23 Apr 2024 23:59:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 01D1453800; Tue, 23 Apr 2024 23:59:10 +0000 (UTC) Received: from fgw20-7.mail.saunalahti.fi (fgw20-7.mail.saunalahti.fi [62.142.5.81]) (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 0F83953E33 for ; Tue, 23 Apr 2024 23:59:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.142.5.81 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713916749; cv=none; b=Hste8Hn4/Gqit4EN6A1ew/2tcnHutTaewvktY1rA1dJA3QtZuw6EA5H1mz0JWPxZDVomdi7+GQcTgR0pCkkP60+yXFVaE4C3Ig2cGsi50Ly/RZuCrUGLVlVuydNkZs6rH89x/gk9fUd4QPQqVWK4ZD+u1r5s5tycjnHQk5ifRpo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713916749; c=relaxed/simple; bh=v5HpaNzjnS+nzagCgPnhRXGNmlFHAWypeXId0ro+rLs=; h=From:Date:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ow8hSuiRg7R+YYwHZStA6ALyqcCnzM7PgH9D/HpXvJbY/Pdk1b0g+Dtd1uttJz9UNK0W1C0HRvVHOpZpa0/vLlbh2dhUE6eOD91dUEQLiDSL4W/tmRN96lrOk3lVay6dw2UXFpilZxUrg6T9gt6NEH7W3N+x3dvbMKnbeHO6UkE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com; spf=fail smtp.mailfrom=gmail.com; arc=none smtp.client-ip=62.142.5.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=gmail.com Received: from localhost (88-113-25-208.elisa-laajakaista.fi [88.113.25.208]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id 772b339a-01cd-11ef-b972-005056bdfda7; Wed, 24 Apr 2024 02:59:05 +0300 (EEST) From: Andy Shevchenko Date: Wed, 24 Apr 2024 02:59:04 +0300 To: Florian Fainelli Cc: linux-kernel@vger.kernel.org, Jarkko Nikula , 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" Subject: Re: [PATCH 1/4] i2c: designware: Create shared header hosting driver name Message-ID: References: <20240423233622.1494708-1-florian.fainelli@broadcom.com> <20240423233622.1494708-2-florian.fainelli@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=us-ascii Content-Disposition: inline In-Reply-To: <20240423233622.1494708-2-florian.fainelli@broadcom.com> 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. .. > --- a/drivers/i2c/busses/i2c-designware-platdrv.c > +++ b/drivers/i2c/busses/i2c-designware-platdrv.c All as per above. -- With Best Regards, Andy Shevchenko