Re: [S390] cio: Make ccw_dev_id_is_equal() more robust.

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

 



On Mon, Dec 04, 2006 at 03:56:24PM +0100, Martin Schwidefsky wrote:
... 
> diff -urpN linux-2.6/include/asm-s390/cio.h linux-2.6-patched/include/asm-s390/cio.h
> --- linux-2.6/include/asm-s390/cio.h	2006-12-04 14:50:48.000000000 +0100
> +++ linux-2.6-patched/include/asm-s390/cio.h	2006-12-04 14:51:00.000000000 +0100
> @@ -278,7 +278,10 @@ struct ccw_dev_id {
>  static inline int ccw_dev_id_is_equal(struct ccw_dev_id *dev_id1,
>  				      struct ccw_dev_id *dev_id2)
>  {
> -	return !memcmp(dev_id1, dev_id2, sizeof(struct ccw_dev_id));
> +	if ((dev_id1->ssid == dev_id2->ssid) &&
> +	    (dev_id1->devno == dev_id2->devno))
> +		return 1;
> +	return 0;
>  }

Why not just:

return ((dev_id1->ssid == ......) && (...));

?

Josef "Jeff" Sipek.

-- 
UNIX is user-friendly ... it's just selective about who it's friends are
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux