From patchwork Mon Apr 22 10:00:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 10910879 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 8407513B5 for ; Mon, 22 Apr 2019 10:02:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EE522868C for ; Mon, 22 Apr 2019 10:02:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 604502859A; Mon, 22 Apr 2019 10:02:36 +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,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 C72C42859A for ; Mon, 22 Apr 2019 10:02:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726393AbfDVKCf (ORCPT ); Mon, 22 Apr 2019 06:02:35 -0400 Received: from mail.kernel.org ([198.145.29.99]:34446 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725817AbfDVKCf (ORCPT ); Mon, 22 Apr 2019 06:02:35 -0400 Received: from localhost.localdomain (cpc91196-cmbg18-2-0-cust659.5-4.cable.virginm.net [81.96.234.148]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id C68B720811; Mon, 22 Apr 2019 10:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555927354; bh=ENgcRb2S3oPn/EmyUnQ4K4/nqUOWI0KzvobKKNq7CJw=; h=From:To:Cc:Subject:Date:From; b=fU9WBk+ygjDFoq/uhoO48Q3n1cXDjvNOjkVjeEO6SA8Hi/khSgMfs4tXYbzf/4Lxe qq1BgeHDFJnu/2aW70VTHQOow8cgtsm7V5lAFsfp4TwOuB9ijH5OL5Q2IbjSUU5hO+ kJhOC/zLZAlvdgGAlVHIuhpPQBuwFnKNtp+tauvY= From: jic23@kernel.org To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH] iio:gyro:mp3050 Suppress 'false' sparse warning about endian assigment. Date: Mon, 22 Apr 2019 11:00:30 +0100 Message-Id: <20190422100030.10561-1-jic23@kernel.org> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 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 From: Jonathan Cameron In this particular case the value being assigned is 0xAAAA so is not effected by the endian choice. It's easy to suppress so we might as well do so to make it easier to spot real warnings. Warning is: CHECK drivers/iio/gyro/mpu3050-core.c drivers/iio/gyro/mpu3050-core.c:544:48: warning: incorrect type in assignment (different base types) drivers/iio/gyro/mpu3050-core.c:544:48: expected restricted __be16 drivers/iio/gyro/mpu3050-core.c:544:48: got int Signed-off-by: Jonathan Cameron Cc: Linus Walleij --- drivers/iio/gyro/mpu3050-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/gyro/mpu3050-core.c b/drivers/iio/gyro/mpu3050-core.c index 496ed4c99ce9..9aacaca145e4 100644 --- a/drivers/iio/gyro/mpu3050-core.c +++ b/drivers/iio/gyro/mpu3050-core.c @@ -541,7 +541,7 @@ static irqreturn_t mpu3050_trigger_handler(int irq, void *p) toread = bytes_per_datum; offset = 1; /* Put in some dummy value */ - fifo_values[0] = 0xAAAA; + fifo_values[0] = cpu_to_be16(0xAAAA); } ret = regmap_bulk_read(mpu3050->map,