lkml.org 
[lkml]   [2004]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][2.6.8-rc1-mm1] drivers/scsi/sg.c gcc341 inlining fix
Mikael Pettersson <mikpe@csd.uu.se> wrote:
>
> gcc-3.4.1 errors out in 2.6.8-rc1-mm1 at drivers/scsi/sg.c:
>
> drivers/scsi/sg.c: In function `sg_ioctl':
> drivers/scsi/sg.c:209: sorry, unimplemented: inlining failed in call to 'sg_jif_to_ms': function body not available
> drivers/scsi/sg.c:930: sorry, unimplemented: called from here
> make[2]: *** [drivers/scsi/sg.o] Error 1
> make[1]: *** [drivers/scsi] Error 2
> make: *** [drivers] Error 2
>
> sg_jif_to_ms() is marked inline but used defore its function
> body is available. Moving it nearer the top of sg.c (together
> with sg_ms_to_jif() for consistency) fixes the problem.
>
>...
> static int
> +sg_ms_to_jif(unsigned int msecs)
> +{
> + if ((UINT_MAX / 2U) < msecs)
> + return INT_MAX; /* special case, set largest possible */
> + else
> + return ((int) msecs <
> + (INT_MAX / 1000)) ? (((int) msecs * HZ) / 1000)
> + : (((int) msecs / 1000) * HZ);
> +}
> +
> +static inline unsigned
> +sg_jif_to_ms(int jifs)
> +{
> + if (jifs <= 0)
> + return 0U;
> + else {
> + unsigned int j = (unsigned int) jifs;
> + return (j <
> + (UINT_MAX / 1000)) ? ((j * 1000) / HZ) : ((j / HZ) *
> + 1000);
> + }
> +}
> +


We have standard jiffies_to_msecs() and msecs_to_jiffies() functions in
include/linux/time.h. Can we please make these sg-private versions go away
altogether?

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.058 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site