linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Malý" <madcatxster@prifuk.cz>
To: Joe Perches <joe@perches.com>
Cc: dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org,
	linux-input@vger.kernel.org, elias.vds@gmail.com,
	anssi.hannula@iki.fi
Subject: Re: [RFC] Add ff-memless-next driver
Date: Sun, 15 Dec 2013 14:07:34 +0100	[thread overview]
Message-ID: <5807033.13lmKIeEg9@geidi-prime> (raw)
In-Reply-To: <1387073042.2276.21.camel@joe-AO722>

On Saturday 14 of December 2013 18:04:02 Joe Perches wrote:
> On Sun, 2013-12-15 at 01:19 +0100, Michal Malý wrote:
> > diff --git a/drivers/input/ff-memless-next.c
> > b/drivers/input/ff-memless-next.c
> []
> 
> > +static inline s32 mlnx_clamp_level(const s32 level)
> > +{
> > +	return (level > 0x7fff) ? 0x7fff : ((level < -0x7fff) ? -0x7fff :
> > level);
> 
> 	clamp(level, -0x7fff, 0x7fff);
> []
> 
> > +static inline int mlnx_is_conditional(const struct ff_effect *effect)
> > +{
> > +	return (effect->type == FF_DAMPER) || (effect->type == FF_FRICTION) ||
> > (effect->type == FF_INERTIA) || (effect->type == FF_SPRING); +}
> 
> Maybe try to run your patch through scripts/checkpatch.pl
> 
> bool?
> 80 char line max? (true for the file, not just here)
> switch?
> 	switch (effect->type) {
> 	case FF_DAMPER:
> 	case FF_FRICTION:
> 	case FF_INERTIA:
> 	case FF_SPRING:
> 		return true;
> 	}
> 	return false;

Okay, thanks for the input. I found a problem regarding effect updating in the code anyway. I'll submit a corrected version of the patch once I'm sure it's fixed.

Michal

  reply	other threads:[~2013-12-15 13:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15  0:19 [RFC] Add ff-memless-next driver Michal Malý
2013-12-15  2:04 ` Joe Perches
2013-12-15 13:07   ` Michal Malý [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-12-14 20:58 Michal Malý

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=5807033.13lmKIeEg9@geidi-prime \
    --to=madcatxster@prifuk.cz \
    --cc=anssi.hannula@iki.fi \
    --cc=dmitry.torokhov@gmail.com \
    --cc=elias.vds@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).