Re: [RFC] spi: Using Trigger number to transmit/receive data

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

 




Hi Geert, Hiep

> > +static void qspi_update(const struct rspi_data *rspi, u8 mask, u8 val, u8 reg)
> > +{
> > +       u8 data;
> > +
> > +       data = rspi_read8(rspi, reg);
> > +       data &= ~mask;
> > +       data |= (val & mask);
> 
> I think this "& mask" is superfluous.

This "& mask" protects data from un-anticipative overwrite IMO.
Other driver is using same style.
ex) snd_soc_update_bits()

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux