Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp4790624ybp; Mon, 14 Oct 2019 10:04:06 -0700 (PDT) X-Google-Smtp-Source: APXvYqwEe3o2rcAp7O3fqvRbID8AIVZsPkbaEv3yo83jf8139ENkserl3dRzLQea4NYzta+5ESih X-Received: by 2002:a17:906:b7d0:: with SMTP id fy16mr29922304ejb.207.1571072646542; Mon, 14 Oct 2019 10:04:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571072646; cv=none; d=google.com; s=arc-20160816; b=YgFu29A2rdKbxSqSWUTuc201o/frHLXV6n7EW3flnAAtMG1W+jFbZjU1a2QsPbbZRT xssmKpb1S9pd505kdZiy/2wEDAF9BQZqRbM8IqQRAIm56lJ3M7Igk85VnUcVbZikGsPC oX7wc+PL42oMdLDabEM9hIigA3+PYWZxaEo/XLHG3cXOMtzHyh4rLdHZLWmBJHjEuVpg TzhWpKSvIc61l62M0+NbEiFbkD+OgRCgvf2urcE8Raw7W768UPJNFoR5ajTnsaQZiJVg lQjRz3IeUI/XGs1iobSJW0/dZuyUphOeOhHNoMTTzIpdJ5gNFNC4NOuK0SIQIq6THgfl dkwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=wIoBDScOGkLSuYDIeVfCeu9Ufgq3yJH9EV0ta3OC3PQ=; b=ozO+1Vdelx+KyLDByg4VMhlsofXyXziC908lxlkJOVeDAezZhV80BNTxBlJl9URKyG SKD38YWR15FKf4GYlJFpeis8Q+U3wZ0nCdjajFXsbrz8LIrEP2hDKk1DImySZjn5KRFY lAlywl56djYLcsARYXW29M0VwRiVdEyzKIuZUTfM+o99vnPE3L7b3J4B5uEQyZBFTM/C vqsi+NyrykUwjIScxPB427Ha+pFYy0B1DGhLWzvq795UieYiv6b3TsdgU1sRRX60uj0e lL0qMSyIqigC6xT8Znl07t8Ac4Be5z4mYka4YPduVZeaDvJBVmTZFTe/cgiI+iUQf8ee Ak4Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rn2si11281129ejb.14.2019.10.14.10.03.41; Mon, 14 Oct 2019 10:04:06 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732305AbfJNQfz (ORCPT + 99 others); Mon, 14 Oct 2019 12:35:55 -0400 Received: from mga18.intel.com ([134.134.136.126]:2300 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731960AbfJNQfy (ORCPT ); Mon, 14 Oct 2019 12:35:54 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Oct 2019 09:35:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.67,296,1566889200"; d="scan'208";a="278916691" Received: from lkp-server01.sh.intel.com (HELO lkp-server01) ([10.239.97.150]) by orsmga001.jf.intel.com with ESMTP; 14 Oct 2019 09:35:51 -0700 Received: from kbuild by lkp-server01 with local (Exim 4.89) (envelope-from ) id 1iK3K3-000DCB-1R; Tue, 15 Oct 2019 00:35:51 +0800 Date: Tue, 15 Oct 2019 00:35:34 +0800 From: kbuild test robot To: Dan Robertson Cc: kbuild-all@lists.01.org, Jonathan Cameron , linux-iio@vger.kernel.org, Peter Meerwald-Stadler , devicetree@vger.kernel.org, Hartmut Knaack , Rob Herring , Mark Rutland , linux-kernel@vger.kernel.org, Dan Robertson Subject: Re: [PATCH v2 2/2] iio: (bma400) add driver for the BMA400 Message-ID: <201910150017.MkSBCEcB%lkp@intel.com> References: <20191012035420.13904-3-dan@dlrobertson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20191012035420.13904-3-dan@dlrobertson.com> X-Patchwork-Hint: ignore User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Dan, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on iio/togreg] [cannot apply to v5.4-rc3 next-20191014] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Dan-Robertson/dt-bindings-iio-accel-bma400-add-bindings/20191014-034052 base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg If you fix the issue, kindly add following tag Reported-by: kbuild test robot smatch warnings: drivers/iio/accel/bma400_core.c:422 bma400_set_accel_oversampling_ratio() warn: unsigned 'acc_config' is never less than zero. vim +/acc_config +422 drivers/iio/accel/bma400_core.c 404 405 static int bma400_set_accel_oversampling_ratio(struct bma400_data *data, 406 int val) 407 { 408 int ret; 409 unsigned int acc_config; 410 411 if (val & ~BMA400_TWO_BITS_MASK) 412 return -EINVAL; 413 414 /* 415 * The oversampling ratio is stored in a different register 416 * based on the power-mode. 417 */ 418 switch (data->power_mode) { 419 case POWER_MODE_LOW: 420 ret = regmap_read(data->regmap, BMA400_ACC_CONFIG0_REG, 421 &acc_config); > 422 if (acc_config < 0) 423 return acc_config; 424 425 ret = regmap_write(data->regmap, BMA400_ACC_CONFIG0_REG, 426 (acc_config & ~BMA400_LP_OSR_MASK) | 427 (val << BMA400_LP_OSR_SHIFT)); 428 if (ret < 0) { 429 dev_err(data->dev, "Failed to write out OSR"); 430 return ret; 431 } 432 433 data->oversampling_ratio = val; 434 return 0; 435 case POWER_MODE_NORMAL: 436 ret = regmap_read(data->regmap, BMA400_ACC_CONFIG1_REG, 437 &acc_config); 438 if (ret < 0) 439 return ret; 440 441 ret = regmap_write(data->regmap, BMA400_ACC_CONFIG1_REG, 442 (acc_config & ~BMA400_NP_OSR_MASK) | 443 (val << BMA400_NP_OSR_SHIFT)); 444 if (ret < 0) { 445 dev_err(data->dev, "Failed to write out OSR"); 446 return ret; 447 } 448 449 data->oversampling_ratio = val; 450 return 0; 451 default: 452 return -EINVAL; 453 } 454 return ret; 455 } 456 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation