From mboxrd@z Thu Jan 1 00:00:00 1970 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 1D1C625FA1D; Tue, 27 May 2025 11:54:55 +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=1748346896; cv=none; b=N9u3sjJ5tivlAP53jLByeZj35e1Oa2r60FU2GQAV+tbmZTALumtpzb2g9Bp0IEyxPKYfPo5LtGIYeDNU2h5FCSQKCvvTA0AX8fJYLYj8+0zk/8uiPXmrj9LA4Zjt5RAA9EfA5UF+d31y//iVUDCIfEo0M0HtRVmgvnJfJ96ZsqY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1748346896; c=relaxed/simple; bh=IUjsVUHoLW+jbfDN7gXz+vjDPdWp+GcouAig6th4mUE=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=ibKCxbA0oa0Hg74a+V9PH+IReMAmW4aoVxiSH8v/90gERDrCcHPh38PZ+YNDXjXv/jw0VEk5HyrjLt2UlKQh1CgJ1PLTXEaRmNLGA5EcTUqbLAl0KUGMbCUaQq1UW6IJO647xv0gSfpXm2QlCLP/bvnuzymu69IAhNepjWDNiBI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FN/4b7q6; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FN/4b7q6" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9288EC4CEEB; Tue, 27 May 2025 11:54:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1748346895; bh=IUjsVUHoLW+jbfDN7gXz+vjDPdWp+GcouAig6th4mUE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FN/4b7q65B2O6Krre7dKF0xYdOlmPrBhzwRAR8nLPnwGsFacJtLy2NKo0Ftu/R/ut V+2uB5OFHUI/L0rTRPcV6Ebo10poTqSaT4QWjM1gxPNDFtL0JIW67zrRgcFEaHnV2z AvYD2v5WB8OCjC2KHxg6B1fU3OG4Nq40312xE709Q/2v3UHd8x8/lgdezdMmHLo85r 6dIMfAO9GnSEZkpOelen0osMCirqjdqZajr6+jTSHNymzQQhUzquQXou7UNhM3iXME pd2wYQJ2tOSvkg86S0w9kiUM6mGFNYHOZoy53a0MsMAQQ/blydz5oyKj+sgVZpvgPV OK+a5vFIuEPfA== Date: Tue, 27 May 2025 13:54:49 +0200 From: Alexey Gladkov To: James Bottomley Cc: Petr Pavlu , Luis Chamberlain , Sami Tolvanen , Daniel Gomez , Masahiro Yamada , Nathan Chancellor , Nicolas Schier , linux-kernel@vger.kernel.org, linux-modules@vger.kernel.org, linux-kbuild@vger.kernel.org, Khalid Aziz , "Martin K. Petersen" , linux-scsi Subject: Re: [PATCH v3 1/6] scsi: Define MODULE_DEVICE_TABLE only if necessary Message-ID: References: <628e85f1b7e9d0423a8b83ac3150b3e151c9c4e3.1748335606.git.legion@kernel.org> Precedence: bulk X-Mailing-List: linux-modules@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Tue, May 27, 2025 at 07:28:59AM -0400, James Bottomley wrote: > On Tue, 2025-05-27 at 11:07 +0200, Alexey Gladkov wrote: > > Define MODULE_DEVICE_TABLE only if a structure is defined for it. > > > > drivers/scsi/BusLogic.c:3735:26: error: use of undeclared identifier > > 'blogic_pci_tbl' > >  3735 | MODULE_DEVICE_TABLE(pci, blogic_pci_tbl); > > Well, a) need to cc the scsi list Sorry. I miss it. > and b) how is this possible when > MODULE_DEVICE_TABLE() has an empty definition if MODULE isn't defined > (so the guard you move should be over an empty statement)? In the next patch: [PATCH v3 4/6] modpost: Create modalias for builtin modules I remove this condition for the MODULE_DEVICE_TABLE macro and it will be always defined. I put the drivers/scsi/BusLogic.c change before these changes to avoid errors. Besides, even an empty macro uses a structure name that is not defined (if MODULE isn't defined). This seems wrong in any case. -- Rgrds, legion