From: J Freyensee <james_p_freyensee@linux.intel.com>
To: Jesper Juhl <jj@chaosbits.net>
Cc: gregkh@suse.de, linux-kernel@vger.kernel.org,
suhail.ahmed@intel.com, christophe.guerard@intel.com
Subject: Re: [PATCH 3/4] Intel PTI implementaiton of MIPI 1149.7.
Date: Thu, 05 May 2011 15:30:48 -0700 [thread overview]
Message-ID: <1304634648.8860.86.camel@localhost> (raw)
In-Reply-To: <1304616467.8860.80.camel@localhost>
> >
> > static void pti_tty_cleanup(struct tty_struct *tty)
> > {
> > if (!tty->driver_data)
> > return;
> > pti_release_masterchannel(tty->driver_data->mc);
> > kfree(tty->driver_data);
> > }
> >
>
> I think I answered this already; I like the suggestion and will tweak.
>
> > ...
> > > +static int pti_tty_driver_write(struct tty_struct *tty,
> > > + const unsigned char *buf, int len)
> > > +{
> > > + struct pti_masterchannel *mc;
> > > + struct pti_tty *pti_tty_data;
> > > +
> > > + pti_tty_data = tty->driver_data;
> > > + mc = pti_tty_data->mc;
> > > + pti_write_to_aperture(mc, (u8 *)buf, len);
> > > +
> > > + return len;
> > > +}
> >
> > I'd like to suggest this as an alternative:
> >
> > static int pti_tty_driver_write(struct tty_struct *tty,
> > const unsigned char *buf, int len)
> > {
> > pti_write_to_aperture(tty->driver_data->mc, (u8 *)buf, len);
> > return len;
> > }
> >
> >
>
> If there is no objections I will do it. What I've coded is the observed
> coding style I've seen, if for no other reason that to shorten up the
> number of '->' used in accessing a member of driver_data. But this
> doesn't look so bad/ugly.
>
Ok, so now I remember why this suggestion isn't good and I am going to
have to go back to what I had before. Some picky compilers do not like
for you to do operations on (void *) variables, other than a beginning
assign statement to a variable with an actual type.
next prev parent reply other threads:[~2011-05-05 22:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-22 23:32 [PATCH 3/4] Intel PTI implementaiton of MIPI 1149.7 james_p_freyensee
2011-04-24 0:55 ` Jesper Juhl
2011-04-24 1:08 ` Jesper Juhl
2011-05-05 17:06 ` J Freyensee
2011-05-05 20:37 ` Jesper Juhl
2011-05-05 17:27 ` J Freyensee
2011-05-05 20:42 ` Jesper Juhl
2011-05-05 22:30 ` J Freyensee [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-06 23:56 james_p_freyensee
2011-04-19 22:58 james_p_freyensee
2011-04-19 23:15 ` Randy Dunlap
2011-04-20 23:05 ` J Freyensee
2011-04-20 23:10 ` Randy Dunlap
2011-04-21 21:06 ` J Freyensee
2011-04-21 21:17 ` Randy Dunlap
2011-04-20 1:25 ` David Rientjes
2011-04-20 9:46 ` Alan Cox
2011-04-20 18:07 ` J Freyensee
2011-04-22 17:57 ` J Freyensee
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=1304634648.8860.86.camel@localhost \
--to=james_p_freyensee@linux.intel.com \
--cc=christophe.guerard@intel.com \
--cc=gregkh@suse.de \
--cc=jj@chaosbits.net \
--cc=linux-kernel@vger.kernel.org \
--cc=suhail.ahmed@intel.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.