Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp17940738ybl; Thu, 2 Jan 2020 15:13:56 -0800 (PST) X-Google-Smtp-Source: APXvYqzkvCUUPwBm/4hqTACR/PF4AfHJVVN+7a8gUDVMOR9SYXQdiiMSc0QXEaG/Qxitu3EsEHkD X-Received: by 2002:a9d:7851:: with SMTP id c17mr74429001otm.58.1578006836076; Thu, 02 Jan 2020 15:13:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578006836; cv=none; d=google.com; s=arc-20160816; b=uYsv3x1wPdqPOpV1PoozVrGSpqVVzkvEhN4m0MnSzXf3cqvobP0VS3r2KQ0H0gnDCb 9xYeLGbEtWhAwQKRSFd9KyO+uSJWJB+l+4nR3Gx81PwNYaHnSv97EBnMUyMK1j2Lq/o2 ps23cyMIkNAkcH6Vs/PSNtBtU0KvIQVD3c6NnJ/46W3KeEo7wja5CBBQt6r0twc1f7Vb lF/LfcyG3Yzcs+AR0KxtwJ+QhnTjdQDlE8fENHpHZAkWA1u1EU1udERg4+m6Z6aGDnlT V8DjT3cCR9Rbo2fd9t50BISQv2tHzYebGhA8Fw954DQOZBrA0xAZbAm+6aNto/OBfazr IH+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=e63gdz5YuMuvi8fE8kDpwQJYDWMw76wyGUEI1HFP0q8=; b=gjUiHxWWnWqIE/xXZnI+sNmf3yIbVVOFupPkN80Ud0MPfbmXjjnRPFBsFm1hyetNXq TsKkdNG2TF8iAH3Ks4srp+QB83DlJYXOm+3kmtRLcrlvnNQmYyaPMc9uc6y9C+oDa/9m AJmzAXKv4nny73Nme4DPRiCHfNQbD/kF7qlsXV8JONsf9LP8r/6No8KBxbe0ThsBhqcR V3GBiqlZFR08k7pDvY1AW4HS3fSG2FODZw9fgNEgT0iDV0N4Ti/VgcqefucsHGP2g0UF tmUnwSZcUMO8G2w8bqNQvF+WSKv0JS8jSTYbX2TahoHCA0aGOpDTcxt8/6KEIChmtuB6 fkxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="TMM6/Bde"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v141si26421752oif.161.2020.01.02.15.13.44; Thu, 02 Jan 2020 15:13:56 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b="TMM6/Bde"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730089AbgABWsz (ORCPT + 99 others); Thu, 2 Jan 2020 17:48:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:56200 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729739AbgABW1d (ORCPT ); Thu, 2 Jan 2020 17:27:33 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66AA62253D; Thu, 2 Jan 2020 22:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004052; bh=LtoQL/EWMcRI+N8UsFtKtoltRqp9udZk7tULpAar5I8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TMM6/BdeqhUSeZm9SUo5es/eJ++J7XGx6bu122mGztIMhnikULcVOCfOlJh5wLL/S BbSZgizYISXCNJ4AZVFrstMMtWgys7fFn4TEg/+a4LOxyOfyKMVw8INR98mP+zRI30 murK8/lFdXWuYDVYNeZNyRzvlB1AKMx+GmViA2jY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Krzysztof Wilczynski , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Jonathan Cameron , Sasha Levin Subject: [PATCH 4.9 009/171] iio: light: bh1750: Resolve compiler warning and make code more readable Date: Thu, 2 Jan 2020 23:05:40 +0100 Message-Id: <20200102220548.211776990@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.960200039@linuxfoundation.org> References: <20200102220546.960200039@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Krzysztof Wilczynski [ Upstream commit f552fde983d378e7339f9ea74a25f918563bf0d3 ] Separate the declaration of struct bh1750_chip_info from definition of bh1750_chip_info_tbl[] in a single statement as it makes the code hard to read, and with the extra newline it makes it look as if the bh1750_chip_info_tbl[] had no explicit type. This change also resolves the following compiler warning about the unusual position of the static keyword that can be seen when building with warnings enabled (W=1): drivers/iio/light/bh1750.c:64:1: warning: ‘static’ is not at beginning of declaration [-Wold-style-declaration] Related to commit 3a11fbb037a1 ("iio: light: add support for ROHM BH1710/BH1715/BH1721/BH1750/BH1751 ambient light sensors"). Signed-off-by: Krzysztof Wilczynski Acked-by: Uwe Kleine-König Signed-off-by: Jonathan Cameron Signed-off-by: Sasha Levin --- drivers/iio/light/bh1750.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/light/bh1750.c b/drivers/iio/light/bh1750.c index b05946604f80..6d5bb11594dc 100644 --- a/drivers/iio/light/bh1750.c +++ b/drivers/iio/light/bh1750.c @@ -62,9 +62,9 @@ struct bh1750_chip_info { u16 int_time_low_mask; u16 int_time_high_mask; -} +}; -static const bh1750_chip_info_tbl[] = { +static const struct bh1750_chip_info bh1750_chip_info_tbl[] = { [BH1710] = { 140, 1022, 300, 400, 250000000, 2, 0x001F, 0x03E0 }, [BH1721] = { 140, 1020, 300, 400, 250000000, 2, 0x0010, 0x03E0 }, [BH1750] = { 31, 254, 69, 1740, 57500000, 1, 0x001F, 0x00E0 }, -- 2.20.1