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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sat, 19 May 2012 07:48:05 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	H Hartley Sweeten <hartleys@...ionengravers.com>
CC:	Ian Abbott <ian.abbott@....co.uk>,
	Linux Kernel <linux-kernel@...r.kernel.org>,
	"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
	"fmhess@...rs.sourceforge.net" <fmhess@...rs.sourceforge.net>,
	"gregkh@...uxfoundation.org" <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] staging: comedi: cleanup all the comedi_driver 'detach'
 functions

On 18/05/12 18:52, H Hartley Sweeten wrote:
> On Friday, May 18, 2012 10:48 AM, Ian Abbott wrote:
>> On 2012-05-18 17:56, H Hartley Sweeten wrote:
>>> Can you test this patch and let me know what the resulting output
>>> is? You may need to change the dev_dbg to dev_info or something
>>> else if you don't have the proper kernel debugging enabled.
>>
>>> diff --git a/drivers/staging/comedi/drivers.c b/drivers/staging/comedi/drivers.c
>>> index 1c3d638..d6bb1f9 100644
>>> --- a/drivers/staging/comedi/drivers.c
>>> +++ b/drivers/staging/comedi/drivers.c
>>> @@ -91,11 +91,14 @@ static void cleanup_device(struct comedi_device *dev)
>>>    static void __comedi_device_detach(struct comedi_device *dev)
>>>    {
>>>    	dev->attached = 0;
>>> -	if (dev->driver)
>>> +	if (dev->driver) {
>>>    		dev->driver->detach(dev);
>>> -	else
>>> -		printk(KERN_WARNING
>>> +		dev_dbg(dev->class_dev, "%s detached\n",
>>> +			dev->driver->driver_name);
>>> +	} else {
>>> +		dev_warn(dev->class_dev,
>>>    		       "BUG: dev->driver=NULL in comedi_device_detach()\n");
>>> +	}
>>>    	cleanup_device(dev);
>>>    }
>>
>> It works, but I'd prefer dev_info over dev_dbg.
>
> OK. What was the actual message output?

Nothing surprising.  After changing it to dbg_info I got:

comedi comedi0 amplc_pci230 detached

after removing a pci230 on /dev/comedi0, either by rmmod'ing the 
amplc_pci230 module, or by running `comedi_config -r /dev/comedi0`.

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
--
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