All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Cc: Masaru Nomura <massa.nomura@gmail.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>,
	Tapasweni Pathak <tapaswenipathak@gmail.com>,
	Iulia Manda <iulia.manda21@gmail.com>,
	Catalina Mocanu <catalina.mocanu@gmail.com>,
	sparmaintainer@unisys.com, devel@driverdev.osuosl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] staging/unisys/visorutil/procobjecttree: Replace typedef
Date: Mon, 02 Feb 2015 10:32:02 -0800	[thread overview]
Message-ID: <1422901922.30476.8.camel@perches.com> (raw)
In-Reply-To: <1422901593-5707-3-git-send-email-ricardo.ribalda@gmail.com>

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...");




      reply	other threads:[~2015-02-02 18:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 18:26 [PATCH 0/2] Code Styte Ricardo Ribalda Delgado
2015-02-02 18:26 ` [PATCH 1/2] staging/unisys/visorutil/procobjecttree: Code Style Ricardo Ribalda Delgado
2015-02-02 18:26 ` [PATCH 2/2] staging/unisys/visorutil/procobjecttree: Replace typedef Ricardo Ribalda Delgado
2015-02-02 18:32   ` Joe Perches [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422901922.30476.8.camel@perches.com \
    --to=joe@perches.com \
    --cc=catalina.mocanu@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=iulia.manda21@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=massa.nomura@gmail.com \
    --cc=peter.p.waskiewicz.jr@intel.com \
    --cc=ricardo.ribalda@gmail.com \
    --cc=sparmaintainer@unisys.com \
    --cc=tapaswenipathak@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.