lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 05 May 2011 15:30:48 -0700
From:	J Freyensee <james_p_freyensee@...ux.intel.com>
To:	Jesper Juhl <jj@...osbits.net>
Cc:	gregkh@...e.de, linux-kernel@...r.kernel.org,
	suhail.ahmed@...el.com, christophe.guerard@...el.com
Subject: Re: [PATCH 3/4] Intel PTI implementaiton of MIPI 1149.7.


> > 
> > 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.    


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

Powered by Openwall GNU/*/Linux Powered by OpenVZ