From patchwork Fri Jun 14 16:31:14 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Melissa Wen X-Patchwork-Id: 10995921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 60A9A76 for ; Fri, 14 Jun 2019 16:31:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50B2526E78 for ; Fri, 14 Jun 2019 16:31:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 44AA9284D4; Fri, 14 Jun 2019 16:31:27 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 0000F26E78 for ; Fri, 14 Jun 2019 16:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726268AbfFNQb0 (ORCPT ); Fri, 14 Jun 2019 12:31:26 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:42528 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726138AbfFNQb0 (ORCPT ); Fri, 14 Jun 2019 12:31:26 -0400 Received: by mail-wr1-f65.google.com with SMTP id x17so3167627wrl.9; Fri, 14 Jun 2019 09:31:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=NSjWY72/27Nxf7scfOqq9fJamExCtzdkq18+lH2oiWs=; b=FzfVqTouAeJEjXvpO2f1HVJWD9ymvouREUbknXILHtapXUNj0DSle1t4ZYy/GNsPPY lqfC/zuujuAwp+TNWDNpTZzhse3p2hqjxcZ9iymWFHDM1V4JE8EPODo3GCF7PdLREQmJ UKwlw1r5SRPM2pyicrMiEa2DGgg+r2j/E7z7IEKPODX7FQ2KCwplq2hoibmS4rOKoCXS wn3FtE2Bnnk2XP5QP6Piab2cY5aMtmZieVeFy2uDcyzZ2m2Nt9cpKQFJtTymu9wZ3dOb laiEl/LvAXL5gqeXGsP6CjcLyjBhmj/YydlZ2AEVA6+QZLtuhDxWngHdjosXQHOq4RXA 0apQ== 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:mime-version :content-disposition:user-agent; bh=NSjWY72/27Nxf7scfOqq9fJamExCtzdkq18+lH2oiWs=; b=E9ifqTn6kEpYyE0+e0dvlk3426A9I+Ydmr9l2h26ZdobyKebPUJikHJhNNTQZpv60G qjd2Q4fGVpBsJARf5JkJ9FNtfJv0GnAd34s3btpv9eYKWVDJOBTzTp8mjl1DFwcGIYDz QwiGVz/ha8INKPNDT/zaIlK6XJ3jocu4vs9QkSPUstu/+Ag/f5moiwElq7uOAvxwqvum +4u3ZCRmFzgH7/0crIc0PMjq8oocKM0oRzP2gBleiYnIvMZitYfjsJMrWvAlr22g3I4y IFCsxKIw1rTo4iMsygnU2Cp2kfFMbd/XozMznlo6VKyRpCJaxpDNoZSh0/ghwqDxFtv6 Cy/Q== X-Gm-Message-State: APjAAAWzt64v89yZOCIQrDWtqe6uWvTVpLcRHBdsefKyD/Vx9g53iYWI DBKcxZwRhGHkM7jXPWmV+1A= X-Google-Smtp-Source: APXvYqxzZWF80Pk8ck8ZMrwx8jNl4R0iWuKdJzK//3/wYsHze3qGUj3gxLO7PzuhjvOBKF6ZaPU/Fw== X-Received: by 2002:adf:e50c:: with SMTP id j12mr9767121wrm.117.1560529884097; Fri, 14 Jun 2019 09:31:24 -0700 (PDT) Received: from smtp.gmail.com (1.77.115.89.rev.vodafone.pt. [89.115.77.1]) by smtp.gmail.com with ESMTPSA id h90sm8321470wrh.15.2019.06.14.09.31.22 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 14 Jun 2019 09:31:23 -0700 (PDT) Date: Fri, 14 Jun 2019 13:31:14 -0300 From: Melissa Wen To: Lars-Peter Clausen , Michael Hennerich , Stefan Popa , Jonathan Cameron , Hartmut Knaack , Peter Meerwald-Stadler , Greg Kroah-Hartman , Barry Song <21cnbao@gmail.com> Cc: linux-iio@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, kernel-usp@googlegroups.com Subject: [PATCH v2 0/3] staging: iio: ad7150: improve driver readability Message-ID: MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20180716 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 patchset solves readability issues in AD7150 code: use of FIELD_GET to fashion improvement, make operation more succint and remove useless comments. Changes in v2: - Remove noisy patch that reorganized registers definitions - Remove else to improve i2c return operation. Melissa Wen (3): staging: iio: ad7150: use FIELD_GET and GENMASK staging: iio: ad7150: simplify i2c SMBus return treatment staging: iio: ad7150: clean up of comments drivers/staging/iio/cdc/ad7150.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-)