Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp379765rwl; Wed, 5 Apr 2023 01:56:09 -0700 (PDT) X-Google-Smtp-Source: AKy350YrYKKxdPKL8M5ZPRx7Q9/JXVk3pJfaEeedsPl3kIGE1EeaYuhf6bEsvDygbGwX9c9KaQsi X-Received: by 2002:a17:90b:3e82:b0:23f:78d6:6ac5 with SMTP id rj2-20020a17090b3e8200b0023f78d66ac5mr5966980pjb.19.1680684968706; Wed, 05 Apr 2023 01:56:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680684968; cv=none; d=google.com; s=arc-20160816; b=K5Ut697qJkuN8xbyUrLvNCOeHK54hPnmteshMYV71e9kB109VFYcHnheouFI0XCADi yK+HGStmzcxEOnOS5OC67WVE4kQIm1jY088RoRfWWLYilr1bS8weL9sEQx5oolzfW2Dn 4gA5JwZML6C39BjyNY/Cxlat2BI59naOYG2VVmzHqCLDorFJeeDOO9oO6fjGX3G2wIcQ A2b5k7v3D9iFpurP+mrSSVS6ep7l/y3wP04UFFQZ/sp0nSYuXjmpDcIy3syqccsIhltF 81NuNhML2dqu0ii7cB6zaNKkHNPt+mv7J/ntgi0vV4tvs8ZkRyYxPUa4IWtzn9x+L69l rc4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=LHyCxHXsyWeCme2SBfkan+0cb2P+Dwy6ZxzRF9qY8o8=; b=D/BjUkI8JWC+wPBZEgYrYBf71dXN1K4ouYQOHuPyfqAO6XRGVTyU6dEoBJ7DP0vvsf Kwwxebq4rnwkHQ2YmYy1cyfR/+M44tBc25Ua9vcpW/2ItiLymuxFP1QLs2D+ydjyXrz7 bAQwESTUHwc5NhIl+lbXMNeWvyYa9UFUw60LgReKaPzqKIbiZAiUMWqQFtBWILyxKydI QoadEuOpOuJ2gEw3kS4c3UY3c0UtzqSBkKheHnMaBsiyPsECEFpDCtINYkMiyV5U7SKD RBAnsJNHq3GY53qt+dpPOMgfT0xmFZKC4n0DV23pglUcCcyinC3cDCBCnteD2BY2zcsi EhcQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NiVTKeFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a10-20020a1709027d8a00b001a1d47f6116si11623764plm.88.2023.04.05.01.55.57; Wed, 05 Apr 2023 01:56:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NiVTKeFP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237302AbjDEIuT (ORCPT + 99 others); Wed, 5 Apr 2023 04:50:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45742 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237267AbjDEIuN (ORCPT ); Wed, 5 Apr 2023 04:50:13 -0400 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 876952D4B; Wed, 5 Apr 2023 01:50:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1680684612; x=1712220612; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=d4X4l4eWoadoe9XjyDvXrCm6FLnUWU6WjWeqxYZpAPE=; b=NiVTKeFPG9TF6LBjkESp76rXPrmNXcKMNxjWbCpcd26V2etLjV6+o4lo iKlrY+ZLjXsyuQgHdi6/CN+hnHvs31B6xmbsbeMElW43bC9dXGzmZ9wYF NDo6WlHzU+5qDAijzoYhAGdXzkkQVzG4R15IuvM4kB303wmeMpZHoDWLw FjjSZp4/0WYpYYW1xjkG9ACESbihMgjhPvcO/CrGVQkuLtSqZCkZ6XjvQ PxFcGQ+SDHtGgGbB2KkOvx5WCuL+nOegaGenOll1QAQwEv9CWgdtYVpJg SSbeij3L7HfAGTj2WE6ojEcbrW/all5Y7WwgchRLbcM3oJrihLEdsN/xd w==; X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="428688275" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="428688275" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Apr 2023 01:50:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10670"; a="680209122" X-IronPort-AV: E=Sophos;i="5.98,319,1673942400"; d="scan'208";a="680209122" Received: from smile.fi.intel.com ([10.237.72.54]) by orsmga007.jf.intel.com with ESMTP; 05 Apr 2023 01:50:10 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.96) (envelope-from ) id 1pjyqG-00Ckxq-2z; Wed, 05 Apr 2023 11:50:08 +0300 Date: Wed, 5 Apr 2023 11:50:08 +0300 From: Andy Shevchenko To: William Breathitt Gray Cc: Jonathan Cameron , Lars-Peter Clausen , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 3/5] iio: addac: stx104: Improve indentation in stx104_write_raw() Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 Tue, Apr 04, 2023 at 10:12:00AM -0400, William Breathitt Gray wrote: > By bailing out early if chan->output is false for the IIO_CHAN_INFO_RAW, > indentation can be decreased by a tab and code readability improved. ... > + /* DAC can only accept up to a 16-bit value */ > + if ((unsigned int)val > 65535) > + return -EINVAL; While the patch is good per se, I don't like two things (which are also in the original code): - explicit casting (can it be avoided?) - would be good to have U16_MAX or ?.. instead of hard coded number Can it be addressed with (additional) patches? -- With Best Regards, Andy Shevchenko