Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp5528030lfu; Mon, 28 Mar 2022 16:02:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxKLqkrigvLgHkZsAjt8h5VdXCX/0IkADFWtiSxDYfJf5lpBJPS10VsY3iuSwwJtjsQQD48 X-Received: by 2002:a05:6808:1402:b0:2da:b72:74f2 with SMTP id w2-20020a056808140200b002da0b7274f2mr758327oiv.113.1648508537275; Mon, 28 Mar 2022 16:02:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648508537; cv=none; d=google.com; s=arc-20160816; b=c9TBs2BR9YlheorgDVVDoemdKBAXToElkN3Z7WhOYl8zoM3VicNygN+OOQlOBONXP5 gGsXrJ+Z/USWgBcZKncfqOvsXTmxXwVDp8gebwIAeBH2XN8t2qRb8Omdnx81euGgoWyr t1AZ9qA74gqyMZvoiUk8gd0ES5UfP9w8MVcZygZS9Z4ZAOxO19g2SbQVJ9jFJ2ppH67x 20oYmqi5eIJXw4ks/23Dfxe9hGF4iu63t6MWOrjML3cNRCw0V9CAiJ9nG7n/BpO+ocGH ns6LgElMocJuEGOfBa6KjmjTtTKW+tLntKlS6GDW5DC5w016OJCw4RFM+ift4J16gCsm 8bZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=Ye0oy6Q6I6v6nn8Qpb028kdov6Po2Xpx/5yOfg1fSiI=; b=Bcewj7hvWSmrwvWzOcRSC1eAy90Cb8Ojex5WQ9wDFZjvXDu7xBiukRbC4puNeUn/lT ZTtIi981DRgAoGasVptoIbpG5kzwBwjLhTbsAOtw67JPOds3dSNZW/1xv/IWDQdS0HZw X7x9UHgb+pY+KFGws3M0Z3LojHDD4CJFZhJXYsztTx3jzW/D6Tp7hahKJ2IK3CW1Cb7z mDtxw8faJnuIgG5tv4RklkN8VVt8/4mOmrih9sAcpj+sZQS/53l23qBDj+B3i+PiWyvS 0WSmK0QKmXp5ElKDVEtuxnQQLgF8hoGXfjTbhOyi+uwDhQv2wxVgQ93E/F3QC3lwRoHf CzoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id a8-20020a05687073c800b000da716e621bsi10766367oan.164.2022.03.28.16.02.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Mar 2022 16:02:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8BBC02976D3; Mon, 28 Mar 2022 15:01:24 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229459AbiC1VIm (ORCPT + 99 others); Mon, 28 Mar 2022 17:08:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbiC1VIl (ORCPT ); Mon, 28 Mar 2022 17:08:41 -0400 Received: from mail.thepaulodoom.com (www.thepaulodoom.com [45.77.108.202]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 04B72E0CB; Mon, 28 Mar 2022 14:06:58 -0700 (PDT) Received: from hp-amd-paul (c-98-240-189-147.hsd1.mn.comcast.net [98.240.189.147]) by vultr.guest (OpenSMTPD) with ESMTPSA id ffe6c82d (TLSv1.3:AEAD-AES256-GCM-SHA384:256:NO); Mon, 28 Mar 2022 21:06:57 +0000 (UTC) Date: Mon, 28 Mar 2022 16:06:53 -0500 From: Paul Lemmermann To: Andy Shevchenko Cc: Jonathan Cameron , linux-iio , Linux Kernel Mailing List Subject: Re: [PATCH] IIO: accel: fixed coding style issues Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 11:32:44PM +0300, Andy Shevchenko wrote: > On Mon, Mar 28, 2022 at 7:45 PM Paul Lemmermann > wrote: > > > > Fixed case statement issues and spacing issues. > > ... > > > switch (val[j]) { > > - case -1: str = "-1"; break; > > - case 0: str = "0"; break; > > - case 1: str = "1"; break; > > - default: goto unknown_format; > > + case -1: > > + str = "-1"; > > + break; > > + case 0: > > + str = "0"; > > + break; > > + case 1: > > + str = "1"; > > + break; > > + default: > > + goto unknown_format; > > } > > What you cited from documentation mostly affects the new code, but > this code is already in the kernel and modifying it, esp. taking into > account 3x LOCs count, looks like an unneeded churn, even if > documentation thinks otherwise. > > What I could acknowledge from your proposal is the default case. > Otherwise just leave it to the point if we touch this code for > something else in the future. > > ... > > > static const struct of_device_id kxsd9_of_match[] = { > > - { .compatible = "kionix,kxsd9" }, > > - { }, > > + { .compatible = "kionix,kxsd9" }, > > > + { }, > > I dunno why you touched this line (likely TABs vs. spaces), but please > remove the comma as well here. Yes, that is exactly why this patch exists. Thank you, I will take these thoughts into account and submit a new patch. Thanks! Paul > > > }; > > -- > With Best Regards, > Andy Shevchenko