[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Mon, 02 Feb 2015 10:32:02 -0800
From: Joe Perches <joe@...ches.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc: Masaru Nomura <massa.nomura@...il.com>,
Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
Tapasweni Pathak <tapaswenipathak@...il.com>,
Iulia Manda <iulia.manda21@...il.com>,
Catalina Mocanu <catalina.mocanu@...il.com>,
sparmaintainer@...sys.com, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] staging/unisys/visorutil/procobjecttree: Replace
typedef
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...");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists