Re: [PATCH 01/16] Thermal: Make Thermal trip points writeable

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

 



On Monday, July 23, 2012, Zhang Rui wrote:
> On 四, 2012-07-19 at 22:27 +0200, Rafael J. Wysocki wrote:
> > On Thursday, July 19, 2012, Zhang Rui wrote:
> > > From: Durgadoss R <dugardoss.r@xxxxxxxxx>
[...]
> > >  	if (trips > THERMAL_MAX_TRIPS || trips < 0)
> > >  		return ERR_PTR(-EINVAL);
> > >  
> > > +	if (flag >> trips)
> > > +		return ERR_PTR(-EINVAL);
> > 
> > I'm not sure if this check is necessary.  Does it actually matter is someone
> > passes ones in the unused bit positions?
> > 
> I do not think we can trust this value if the caller even wants to set
> writable mask for a non-exist trip point.

OK, so perhaps we can merge the two conditionals into one?

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


[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux