LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Greg KH <gregkh@suse.de>
To: Alexander van Heukelum <heukelum@mailshack.com>
Cc: Alexander van Heukelum <heukelum@fastmail.fm>,
	Kay Sievers <kay.sievers@vrfy.org>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [PATCH 158/196] Driver core: convert block from raw kobjects
Date: Sun, 27 Jan 2008 11:41:16 -0800	[thread overview]
Message-ID: <20080127194116.GB17136@suse.de> (raw)
In-Reply-To: <20080125232317.GA7131@mailshack.com>

On Sat, Jan 26, 2008 at 12:23:18AM +0100, Alexander van Heukelum wrote:
> Fix build with CONFIG_BLOCK off.
> 
> Building git-2d94dfc with CONFIG_BLOCK turned off gives me:
> 
> drivers/base/core.c: In function 'device_add_class_symlinks':
> drivers/base/core.c:704: error: 'part_type' undeclared (first use in this function)
> drivers/base/core.c:704: error: (Each undeclared identifier is reported only once
> drivers/base/core.c:704: error: for each function it appears in.)
> drivers/base/core.c: In function 'device_remove_class_symlinks':
> drivers/base/core.c:743: error: 'part_type' undeclared (first use in this function)
> 
> git-blame points to Kay Sievers.
> 
> The problem is obvious. I think te solution is too ;).
> 
> Tested with a silly configuration that contains just enough wits to boot
> and get to the prompt of klibc-dash on the built-in initramfs using:
>    qemu -m 8 -cpu pentium -serial stdio -cdrom arch/x86/boot/image.iso
> 
> Compile-tested i386-defconfig.
> 
> Signed-off-by: Alexander van Heukelum <heukelum@fastmail.fm>
> 
> Oh, and the compile-problem still exists in git-99f1c97. The git-tree is
> changing faster than I can test the patch and write an e-mail :-/.
> 
> diff --git a/drivers/base/core.c b/drivers/base/core.c
> index edf3bbe..3751843 100644
> --- a/drivers/base/core.c
> +++ b/drivers/base/core.c
> @@ -75,6 +75,15 @@ static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr,
>  	return ret;
>  }
>  
> +static int dev_needs_link(struct device *dev)
> +{
> +#ifdef CONFIG_BLOCK
> +	return dev->type != &part_type;
> +#else
> +	return 1;
> +#endif
> +}

Ick.  Close, but still messy, let me try to do something cleaner here...

thanks,

greg k-h

      parent reply	other threads:[~2008-01-27 19:43 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-25 23:23 Alexander van Heukelum
2008-01-26  7:31 ` Greg KH
2008-01-27 19:41 ` Greg KH [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=20080127194116.GB17136@suse.de \
    --to=gregkh@suse.de \
    --cc=heukelum@fastmail.fm \
    --cc=heukelum@mailshack.com \
    --cc=kay.sievers@vrfy.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --subject='Re: [PATCH 158/196] Driver core: convert block from raw kobjects' \
    /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

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).