Re: [PATCH] st: cleanup new_tape_buffer

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

 



On Mon, 30 Jan 2006, Christoph Hellwig wrote:

>  - remove superflous forward prototype
>  - remove whitespace before function name
>  - update header comment
>  - remove from_initialization parametes.  It was always 1, but should
>    always be 0 because all callers can sleep

True in 2.6. The other allocations in the only caller (st_probe) could 
also be changed to use GFP_KERNEL.

>  - use kzalloc
>  - remove variable 'got', it was always 0
> 
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> 
> Index: scsi-misc-2.6/drivers/scsi/st.c
> ===================================================================
> --- scsi-misc-2.6.orig/drivers/scsi/st.c	2006-01-30 19:14:29.000000000 +0100
> +++ scsi-misc-2.6/drivers/scsi/st.c	2006-01-30 19:15:13.000000000 +0100
> @@ -180,7 +180,6 @@
>  
>  static int modes_defined;
>  
> -static struct st_buffer *new_tape_buffer(int, int, int);
>  static int enlarge_buffer(struct st_buffer *, int, int);
>  static void normalize_buffer(struct st_buffer *);
>  static int append_to_buffer(const char __user *, struct st_buffer *, int);
> @@ -3574,35 +3573,27 @@
>  
>  
>  
> -/* Try to allocate a new tape buffer. Calling function must not hold
> -   dev_arr_lock. */
> +/* Allocate a new tape buffer. */
>  static struct st_buffer *
> - new_tape_buffer(int from_initialization, int need_dma, int max_sg)
> +new_tape_buffer(int need_dma, int max_sg)

You could remove the newline instead of the blank to put the function 
type and rest of declaration to the same line.

Thanks for the cleanup.

Acked-by: Kai Makisara <Kai.Makisara@xxxxxxxxxxx>

-- 
Kai
-
: 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