Re: [PATCH] scatterlist.h: Change CONFIG_DEBUG_SG for ifdef statement in sg_set_bf

From: Nick Krause
Date: Sun Aug 03 2014 - 00:31:49 EST


On Sat, Aug 2, 2014 at 11:59 PM, Mateusz Guzik <mguzik@xxxxxxxxxx> wrote:
> On Sat, Aug 02, 2014 at 10:56:13PM -0400, Nicholas Krause wrote:
>> This changes the ifdef statement in sg_set_bg to !CONFIG_DEBUG_SG in order
>> to avoid a bug with xhci dequence/enquence functions.
>>
>> Signed-off-by: Nicholas Krause <xerofoify@xxxxxxxxx>
>> ---
>> include/linux/scatterlist.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/linux/scatterlist.h b/include/linux/scatterlist.h
>> index adae88f..62de7b3 100644
>> --- a/include/linux/scatterlist.h
>> +++ b/include/linux/scatterlist.h
>> @@ -111,7 +111,7 @@ static inline struct page *sg_page(struct scatterlist *sg)
>> static inline void sg_set_buf(struct scatterlist *sg, const void *buf,
>> unsigned int buflen)
>> {
>> -#ifdef CONFIG_DEBUG_SG
>> +#ifdef !CONFIG_DEBUG_SG
>> BUG_ON(!virt_addr_valid(buf));
>> #endif
>
> Have you tried compiling this? IIRC you said you would compile your
> stuff, what hapened to that?
>
> What exactly were you trying to achieve? Did this BUG_ON detect a
> problem on your system and now you are trying to silence it?
>
> The change would be wrong even if it compiled since it would just
> execute the assertion only when debug is disabled.
>
> --
> Mateusz Guzik
This is the mailing theme I am getting this from,[xhci] kernel BUG at
include/linux/scatterlist.h:115.
I hope this answers your question about the BUG_ON and yes I did
compile check it with make
M=include/. I also checked usb and usb net directories too.
Regards,
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/