public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: screamingfist@arcor.de
Cc: erazor_de@users.sourceforge.net, jkosina@suse.cz,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH 35/36] hid: roccat: convert class code to use bin_attrs in groups
Date: Tue, 20 Aug 2013 16:58:11 -0700	[thread overview]
Message-ID: <20130820235811.GA13887@kroah.com> (raw)
In-Reply-To: <855534750.937448.1376976526543.JavaMail.ngmail@webmail11.arcor-online.net>

On Tue, Aug 20, 2013 at 07:28:46AM +0200, screamingfist@arcor.de wrote:
> ----- Original Nachricht ----
> Von:     Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> An:      Stefan Achatz <erazor_de@users.sourceforge.net>
> Datum:   15.08.2013 18:40
> Betreff: Re: [PATCH 35/36] hid: roccat: convert class code to use bin_attrs
>  in groups
> 
> > On Thu, Aug 15, 2013 at 06:03:46PM +0200, Stefan Achatz wrote:
> > > Hello Greg,
> > > looking through the patch I found the following:
> > > 
> > > 
> > > 
> > > In hid-roccat-kone.c, PROFILE_ATTR macro:
> > > The line
> > >  .private = &profile_numbers[number],
> > > should read
> > >  .private = &profile_numbers[number-1],
> > 
> > Ah, ok, thanks, will fix up.
> > 
> > > Regarding the compiler warning about unused pyra_sysfs_write_settings:
> > > The attribute is indeed readwrite, but the code to write is not standard
> > > code. The read function was created with the PYRA_SYSFS_R macro and the
> > > write function was written manually. Used were both by
> > > PYRA_BIN_ATTRIBUTE_RW.
> > > In this case I would keep the PYRA_SYSFS_* macros standalone so that the
> > > calling code looks like this:
> > > 
> > > PYRA_SYSFS_W(control, CONTROL);
> > > PYRA_SYSFS_RW(info, INFO);
> > > PYRA_SYSFS_RW(profile_settings, PROFILE_SETTINGS);
> > > PYRA_SYSFS_RW(profile_buttons, PROFILE_BUTTONS);
> > > PYRA_SYSFS_R(settings, SETTINGS);
> > > 
> > > PYRA_BIN_ATTRIBUTE_W(control, CONTROL);
> > > PYRA_BIN_ATTRIBUTE_RW(info, INFO);
> > > PYRA_BIN_ATTRIBUTE_RW(profile_settings, PROFILE_SETTINGS);
> > > PYRA_BIN_ATTRIBUTE_RW(profile_buttons, PROFILE_BUTTONS);
> > > PYRA_BIN_ATTRIBUTE_RW(settings, SETTINGS);
> > 
> > Hm, I'll look this over again and see if I can make it better.
> > 
> > But why are you using a "non standard" write function?  What is special
> > here about this?
> 
> The module stores the written value, so that events from the device can be
> written to chardev with this extra information.
> I made the mistake to put too many functionality in the early kernel modules
> and I'm not getting fully rid of it now.

Ok, I've fixed this up now, so it all good, thanks for reviewing this.

greg k-h

      reply	other threads:[~2013-08-20 23:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-15 16:03 [PATCH 35/36] hid: roccat: convert class code to use bin_attrs in groups Stefan Achatz
2013-08-15 16:40 ` Greg Kroah-Hartman
2013-08-20  5:28   ` Aw: " screamingfist
2013-08-20 23:58     ` Greg KH [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130820235811.GA13887@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=erazor_de@users.sourceforge.net \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=screamingfist@arcor.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox