[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-driver-devel
Subject:    Re: [PATCH 1/4] staging: kpc2000: add spaces around operators in core.c
From:       Greg KH <gregkh () linuxfoundation ! org>
Date:       2019-05-31 0:11:56
Message-ID: 20190531001156.GA25210 () kroah ! com
[Download RAW message or body]

On Thu, May 30, 2019 at 10:57:09PM +0000, Matt Sickler wrote:
> >From: devel <driverdev-devel-bounces@linuxdriverproject.org> On Behalf Of
> >Greg KH
> >On Fri, May 24, 2019 at 01:07:59PM +0200, Simon Sandstr=F6m wrote:
> >> --- a/drivers/staging/kpc2000/kpc2000/core.c
> >> +++ b/drivers/staging/kpc2000/kpc2000/core.c
> >> @@ -276,18 +276,18 @@ static ssize_t kp2000_cdev_read(struct file *fil=
p,
> >
> >This whole function just needs to be deleted, it's a horrible hack.
> =

> >From the outside, I would definitely agree with you.  On the inside thou=
gh, we
> rely on this function to quickly identify what kind and version is runnin=
g on
> a given piece of hardware.  Since that same information is provided by an=
 ioctl,
> I could be convinced to remove this API and write a userspace application=
 that
> uses the ioctl to get the information and pretty prints it.

The ioctl needs to die as well, just use the sysfs entries instead, as
you already have them :)

> I'd be more inclined to agree with the deletion if it means the whole cha=
r dev
> interface can be removed from the kpc2000 driver.  That won't be straight=
forward
> as the ioctl is exposed through this interface.  We could remove the ioct=
l, but
> we'd need to ensure that all the same information is exposed via sysfs.

I think you are there already, what is missing?

> Our userspace side is all funneled through a single class, so changing
> it to use sysfs wouldn't be too difficult.  I'd support that change if
> someone wants to make it.

I will be glad to do that, it's always nice to delete code :)

thanks,

greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic