linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Nathan Chancellor <nathan@kernel.org>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] bsg: Fix build error with CONFIG_BLK_DEV_BSG_COMMON=m
Date: Fri, 30 Jul 2021 09:27:07 +0200	[thread overview]
Message-ID: <20210730072707.GA23847@lst.de> (raw)
In-Reply-To: <20210730012108.3385990-1-nathan@kernel.org>

On Thu, Jul 29, 2021 at 06:21:08PM -0700, Nathan Chancellor wrote:
> When CONFIG_BLK_DEV_BSG_COMMON is enabled as a module, which can happen
> when CONFIG_SCSI=m and CONFIG_BLK_DEV_BSGLIB=n, the following error
> occurs:
> 
> In file included from arch/x86/kernel/asm-offsets.c:13:
> In file included from include/linux/suspend.h:5:
> In file included from include/linux/swap.h:9:
> In file included from include/linux/memcontrol.h:22:
> In file included from include/linux/writeback.h:14:
> In file included from include/linux/blk-cgroup.h:23:
> include/linux/blkdev.h:539:26: error: field has incomplete type 'struct
> bsg_class_device'
>         struct bsg_class_device bsg_dev;
>                                 ^
> include/linux/blkdev.h:539:9: note: forward declaration of 'struct
> bsg_class_device'
>         struct bsg_class_device bsg_dev;
>                ^
> 1 error generated.
> 
> The definition of struct bsg_class_device is kept under an #ifdef
> directive, which does not work when CONFIG_BLK_DEV_BSG_COMMON is a
> module, as the define is CONFIG_BLK_DEV_BSG_COMMON_MODULE.
> 
> Use IS_ENABLED instead, which evaluates to 1 when
> CONFIG_BLK_DEV_BSG_COMMON is y or m.
> 
> Fixes: 78011042684d ("scsi: bsg: Move bsg_scsi_ops to drivers/scsi/")
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Nathan Chancellor <nathan@kernel.org>

Looks fine.  Although I have a larger series pending here:

https://lore.kernel.org/linux-scsi/20210729064845.1044147-1-hch@lst.de/T/#t

that should also fix this issue as a byproduct.

      reply	other threads:[~2021-07-30  7:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-30  1:21 [PATCH] bsg: Fix build error with CONFIG_BLK_DEV_BSG_COMMON=m Nathan Chancellor
2021-07-30  7:27 ` Christoph Hellwig [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210730072707.GA23847@lst.de \
    --to=hch@lst.de \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=martin.petersen@oracle.com \
    --cc=nathan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).