public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: James Bottomley <James.Bottomley@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>,
	scsi <linux-scsi@vger.kernel.org>,
	Linux-Next <linux-next@vger.kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [-next] ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined!
Date: Fri, 07 Jan 2011 13:04:34 -0800	[thread overview]
Message-ID: <1294434274.2895.146.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <1294415045.4895.16.camel@mulgrave.site>

On Fri, 2011-01-07 at 09:44 -0600, James Bottomley wrote:
> On Fri, 2011-01-07 at 11:57 +0100, Geert Uytterhoeven wrote:
> > Since a few days, linux-next shows:
> > 
> > | ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined!
> > 
> > in m68k allmodconfig builds
> > (http://kisskb.ellerman.id.au/kisskb/buildresult/3754323/).
> > 
> > I guess this is caused by the following 3 calls to strstr():
> > 
> > drivers/target/target_core_configfs.c:
> > +       ptr = strstr(page, "1");
> > 
> > +       str = strstr(buf, "_");
> > 
> > +       str2 = strstr(str+1, "_");
> > 
> > Some versions of gcc replace calls to strstr() with single-character
> > "needle" string parameters by calls to strchr() behind our back.
> > This causes linking errors if strchr() is defined as an inline function
> > in <asm/string.h> (e.g. on m68k).
> > 
> > You can prevent this by explicitly calling strchr() instead.
> > 
> > Cfr. commit 59d309f9c8ef0bd01bf93cc0e758f1d810417bdb
> > ("kgdb: Replace strstr() by strchr() for single-character needles).
> > 
> > Gr{oetje,eeting}s,
> 
> Surely the fix for this is not to inline it in m68k? If gcc is growing
> the capability to make these types of transformations, it's not going to
> stop at single entry string strstr().
> 
> If you want to keep the fast inline, there is a way (which I forget) to
> drop an external reference as well, just in case.
> 

Hi guys,

So I really don't have a strong perference here, but would tend to agree
with James that this should probably be fixed in m68k..  If this is too
much of an pain for you Geert I am happy to make this change.

Thanks!

--nab

      reply	other threads:[~2011-01-07 21:10 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-07 10:57 [-next] ERROR: "strchr" [drivers/target/target_core_mod.ko] undefined! Geert Uytterhoeven
2011-01-07 15:44 ` James Bottomley
2011-01-07 21:04   ` Nicholas A. Bellinger [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=1294434274.2895.146.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=James.Bottomley@suse.de \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-scsi@vger.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