Re: PATCH: io.h remove detrimental do {...} whiles, add sequence points, add const modifiers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> There is imho not very much sense in such a macro / function being written
> in a way that returns any value, that is something like
> 
>   foo = set_io_port_base(...)
> 
> doesn't make obvious sense.  So it's written in a way which will take care
> of any attempt to use the return type.

So Brad's way allows things that weren't allowed before.  But does
it break anything that works with the do/while construct?

You can take care of attempts to use the return type by voiding it:

#define set_io_port_base(base)		\
	(void)(*(unsigned long *)&mips_io_port_base = (base))

-jim

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux