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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230613204855.bm4wxneamkd76heq@intel.intel>
Date:   Tue, 13 Jun 2023 22:48:55 +0200
From:   Andi Shyti <andi.shyti@...nel.org>
To:     Marge Yang <marge.yang@...synaptics.com>
Cc:     dmitry.torokhov@...il.com, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org, david.chiu@...synaptics.com,
        derek.cheng@...synaptics.com, sam.tsai@...aptics.com,
        vincent.huang@...synaptics.com
Subject: Re: [PATCH V2] Input: synaptics-rmi4- Add a new feature for Forepad.

Hi Marge,

[...]

> +static irqreturn_t rmi_f21_attention(int irq, void *ctx)
> +{
> +	struct rmi_function *fn = ctx;
> +	struct f21_data *f21 = dev_get_drvdata(&fn->dev);
> +	int error;
> +
> +	error = rmi_read_block(fn->rmi_dev,
> +				fn->fd.data_base_addr+RMI_F21_FORCE_CLICK_OFFSET,
> +				f21->data_regs, 1);
> +	if (error) {
> +		dev_err(&fn->dev,
> +			"%s: Failed to read f21 data registers: %d\n",
> +			__func__, error);
> +		return IRQ_RETVAL(error);
> +	}
> +
> +	if (!!(f21->data_regs[0] & RMI_f21_FORCE_CLICK))

no need for double negation here.

Andi

> +		input_report_key(f21->input, f21->key_code, true);
> +	else
> +		input_report_key(f21->input, f21->key_code, false);
> +	return IRQ_HANDLED;
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ