Search Linux Wireless

Re: [PATCH] rfkill: print events when input handler is disabled/enabled

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

 



On Sun, 2009-06-07 at 17:25 +0200, Marcel Holtmann wrote:

> >  	if (!data->input_handler) {
> > -		atomic_inc(&rfkill_input_disabled);
> > +		if (atomic_inc_return(&rfkill_input_disabled) == 1)
> > +			printk(KERN_DEBUG "rfkill: input handler disabled\n");
> >  		data->input_handler = true;
> >  	}
> 
> do you really think the == 1 is the correct thing here. I think that
> should be a > 0.

Why would you want to know every time somebody uses the ioctl? I think
the first time should be sufficient, no? Common case will hopefully be
only one program using it anyway though.

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux