linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: "Michal Malý" <madcatxster@prifuk.cz>
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: Sat, 14 Dec 2013 18:04:02 -0800	[thread overview]
Message-ID: <1387073042.2276.21.camel@joe-AO722> (raw)
In-Reply-To: <20107437.IkYg87uJMY@geidi-prime>

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;

  reply	other threads:[~2013-12-15  2:04 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 [this message]
2013-12-15 13:07   ` Michal Malý
  -- 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=1387073042.2276.21.camel@joe-AO722 \
    --to=joe@perches.com \
    --cc=anssi.hannula@iki.fi \
    --cc=dmitry.torokhov@gmail.com \
    --cc=elias.vds@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=madcatxster@prifuk.cz \
    /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).