From patchwork Fri Mar 9 23:45:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rodrigo Siqueira X-Patchwork-Id: 10272561 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CCF3F60594 for ; Fri, 9 Mar 2018 23:45:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BB5DB29FE0 for ; Fri, 9 Mar 2018 23:45:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AB7842A03C; Fri, 9 Mar 2018 23:45:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B88D829FE0 for ; Fri, 9 Mar 2018 23:45:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751225AbeCIXpz (ORCPT ); Fri, 9 Mar 2018 18:45:55 -0500 Received: from mail-qt0-f194.google.com ([209.85.216.194]:43452 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751275AbeCIXpz (ORCPT ); Fri, 9 Mar 2018 18:45:55 -0500 Received: by mail-qt0-f194.google.com with SMTP id d26so12943439qtk.10; Fri, 09 Mar 2018 15:45:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SKX4E14l3GDsVoddk+MpjxhKvI5Ku5W9t3ib8pepT3A=; b=YxzElS3b6Ae8aoy+SaZplZuWHX3UyNEK5zXROKKRt+QhgFueLi2IjgIjb+iJ3wI1Va P1NMGw4r2EXx3gpN2q/gazGV2xUCn9LPQetZW9ImHgWuMz0cAl0PrSgdpE7BjQpRsDHZ YQNkUFPxvn+Dib8r60Qb2rZjd3JZkEDi4gdUfwb1n/NLUH0k8AklrIuLMXQ6nWKrVpPt G8/jYsWs9Q45bNMvJv6RFgqH8TtKEO9++vwaCz8/LByoseU10ebZYJNWJGYOeZaTxnQJ A0G2EvM/b+NafsAkBCp2pb82DOOsULP/MTWWNuxJsBXC7hRGKa2w1IFIVOKiN/F1/bng lypw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=SKX4E14l3GDsVoddk+MpjxhKvI5Ku5W9t3ib8pepT3A=; b=sei1QaM118Cl+vKr3Wta9nwy9gpXp8XO+EZFBF+wDWz9l+SXf3rYGan7hvUgoTHWYP 5pnWc/JWHwnolul2Ta/YUbEjCC7DmK5UkZXbe/2Ux54imCUdYHig/qzEjDogQcTzUQZu yCZfdDVuZMUxB00W25G6zwwWQh41Tawr4BRGtMPnGgnTriN5x7lHHvkwXoNEqf+dvxpD No0agJzib9uoJ1MwKL3mIePbbfq965wSEwQGeCmRquu/ZIky8eWgAftft+xS05xwipDr 6l2bBjz9IGJKgrxMTQMWxHdKt3rbhzrGOCUUjmxRaiwtKDVN3rZlm5X4c5/lOqY5h1ey quHw== X-Gm-Message-State: AElRT7EWoYoGKdNfnNH2NN+bH11V3xrRAsA6EL44nHt85tNCKJopMkK+ XFg1zcBt0jJxjbXUE/E/Mts= X-Google-Smtp-Source: AG47ELs4AQG1hx6l7A2tDCVZnNm186Ub8HLHKgcf82L0MdmuTVMbKbTSkZdxI13FAnFPurgcBmRsvA== X-Received: by 10.200.49.226 with SMTP id i31mr421846qte.42.1520639154313; Fri, 09 Mar 2018 15:45:54 -0800 (PST) Received: from smtp.gmail.com ([143.107.45.1]) by smtp.gmail.com with ESMTPSA id z67sm1371312qke.19.2018.03.09.15.45.51 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 15:45:53 -0800 (PST) Date: Fri, 9 Mar 2018 20:45:50 -0300 From: Rodrigo Siqueira To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , Graff Yang Cc: daniel.baluta@nxp.com, linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] staging:iio:ad2s1210: Remove end of line with '[' Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20171215 Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch fixes the checkpatch.pl check: iio/resolver/ad2s1210.c:202: CHECK: Lines should not end with a '[' Signed-off-by: Rodrigo Siqueira --- drivers/staging/iio/resolver/ad2s1210.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/iio/resolver/ad2s1210.c b/drivers/staging/iio/resolver/ad2s1210.c index f8baab061eba..0cdcd71e285b 100644 --- a/drivers/staging/iio/resolver/ad2s1210.c +++ b/drivers/staging/iio/resolver/ad2s1210.c @@ -165,9 +165,10 @@ int ad2s1210_update_frequency_control_word(struct ad2s1210_state *st) static unsigned char ad2s1210_read_resolution_pin(struct ad2s1210_state *st) { - return ad2s1210_resolution_value[ - (gpio_get_value(st->pdata->res[0]) << 1) | - gpio_get_value(st->pdata->res[1])]; + int resolution = (gpio_get_value(st->pdata->res[0]) << 1) | + gpio_get_value(st->pdata->res[1]); + + return ad2s1210_resolution_value[resolution]; } static const int ad2s1210_res_pins[4][2] = {