Re: [PATCH 6/8] aic94xx: move list_each_entry_reverse_safe from sas_discover.h to list.h

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

 



--- Alexis Bruemmer <alexisb@xxxxxxxxxx> wrote:

> Move list_each_entry_reverse_safe from sas_discover.h to the more
> appropriate file list.h
> 
> Signed-off-by: Alexis Bruemmer <alexisb@xxxxxxxxxx>
> Signed-off-by: Mike Anderson <andmike@xxxxxxxxxx>

This isn't used anymore and will cause a bug in certain
circumstances as is evident from the rest of the code.

> 
> ---
>  include/linux/list.h            |    6 ++++++
>  include/scsi/sas/sas_discover.h |    7 -------
>  2 files changed, 6 insertions(+), 7 deletions(-)
> 
> Index: aic94xx-sas-2.6-patched/include/scsi/sas/sas_discover.h
> ===================================================================
> --- aic94xx-sas-2.6-patched.orig/include/scsi/sas/sas_discover.h
> +++ aic94xx-sas-2.6-patched/include/scsi/sas/sas_discover.h
> @@ -115,13 +115,6 @@ struct domain_device {
>  	void *lldd_dev;
>  };
>  
> -#define list_for_each_entry_reverse_safe(pos, n, head, member)		\
> -	for (pos = list_entry((head)->prev, typeof(*pos), member),	\
> -		n = list_entry(pos->member.prev, typeof(*pos), member);	\
> -	     &pos->member != (head); 					\
> -	     pos = n, n = list_entry(n->member.prev, typeof(*n), member))
> -
> -
>  
>  void sas_init_disc(struct sas_discovery *disc, struct sas_port *port);
>  int  sas_discover_event(struct sas_port *sas_port, enum discover_event ev);
> Index: aic94xx-sas-2.6-patched/include/linux/list.h
> ===================================================================
> --- aic94xx-sas-2.6-patched.orig/include/linux/list.h
> +++ aic94xx-sas-2.6-patched/include/linux/list.h
> @@ -542,6 +542,12 @@ static inline void list_splice_init(stru
>  		prefetch(rcu_dereference((pos))->next), (pos) != (head); \
>          	(pos) = (pos)->next)
>  
> +#define list_for_each_entry_reverse_safe(pos, n, head, member)          \
> +	for (pos = list_entry((head)->prev, typeof(*pos), member),      \
> +		n = list_entry(pos->member.prev, typeof(*pos), member); \
> +		&pos->member != (head);                                    \
> +		pos = n, n = list_entry(n->member.prev, typeof(*n), member))
> +
>  /*
>   * Double linked lists with a single pointer list head.
>   * Mostly useful for hash tables where the two pointer list head is
> 
> 
> -
> : send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-
: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux