Re: [PATCH 2/2] staging/unisys/visorutil/procobjecttree: Replace typedef

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

 



On Mon, 2015-02-02 at 19:26 +0100, Ricardo Ribalda Delgado wrote:
> Instead of declaring a new type, define a new struct.
[]
> diff --git a/drivers/staging/unisys/visorutil/procobjecttree.c b/drivers/staging/unisys/visorutil/procobjecttree.c
[]
> @@ -340,7 +341,9 @@ EXPORT_SYMBOL_GPL(visor_proc_DestroyObject);
>  
>  static int seq_show(struct seq_file *seq, void *offset)
>  {
> -	PROCDIRENTRYCONTEXT *ctx = (PROCDIRENTRYCONTEXT *)(seq->private);
> +	struct proc_dir_entry_context *ctx;
> +
> +	ctx = (struct proc_dir_entry_context *)(seq->private);

seq-private is a void * and doesn't need to be cast here.

	struct proc_dir_entry_context *ctx = seq->private;

should work well enough.

>  
>  	if (ctx == NULL) {
>  		ERRDRV("I don't have a freakin' clue...");



_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux