Received: by 10.192.165.148 with SMTP id m20csp559013imm; Wed, 25 Apr 2018 04:15:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+ebQBecHsPPxTsu9aLEQrJ5QBGowY/f5I51BUQr7W2OEqjLGiSpRLMBhuv3xLk1ipAV2AE X-Received: by 10.98.149.21 with SMTP id p21mr19095048pfd.62.1524654926953; Wed, 25 Apr 2018 04:15:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524654926; cv=none; d=google.com; s=arc-20160816; b=tSkO2DhTML8/C2+hmo3wSxSTw8h146G/pktOUvWU6adfpfl/P2hJ89geNoM/8/UQ2P McNySM7pclM36YFOGeiuWyHXVsZGAPS5i/hKTGjL+o2tNbCN0+mP6wAUd3YXjJ7U/OVp duDyy3JX0zF/iZ2WG7PXwuwEly/n7mmM4Q6Rt88FEGPVVe7O7BKeiuyHYuE/Zwk0y2/R rbnDSD0BmGQXBOciu1AHzFgo7Qg+2N/8FSSaH2YJZplzAxvX9B24Ks68ndWbo4Gzikj4 f8EgQ/rW7jspDodi6F+bj+H0BHGMCFykNqsPoZfs1j7lv1C48/E1+pxmgQRQzF2q4W8M +0ww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=T7GnwjqG0GHcSLIJQmtifejIkGgYi/cv4bEvRqNPtds=; b=mVfWNaovZUsS+8hv64QULrijemjTGfuFmtKcjQt6uxU1tEx/spo9jVNtfZ6Bk6b3Zg +IHY5X9kuywxOSnGOmhM3PppE4VSm9iutE4CRHCQPlr/tm2LIgEIuk1bekvrwVyUwEk8 xaXjujy6VvAfrgZVoXvqcTnUDm6P+pR1SrslDNOBM9f1e9aE1sezCIAmFQT4XhmBvqKM 1AdZ/Npyreeg+jOgh5Y5HKJUjKKSDAO6vvE+2ufA98DS8Jo9IwRpVQVBKEarvx5q4+nm yUuQ0WAyglLjibOgD+Mn9ukOjg3BszKySOOZPmdl2DPJaHbYjif2EPogCskb2LMMabi4 V3uA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 125si13580135pge.133.2018.04.25.04.15.12; Wed, 25 Apr 2018 04:15:26 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753941AbeDYLNC (ORCPT + 99 others); Wed, 25 Apr 2018 07:13:02 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:52192 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753843AbeDYKkn (ORCPT ); Wed, 25 Apr 2018 06:40:43 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 5E035272; Wed, 25 Apr 2018 10:40:42 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Corey Minyard , Corey Minyard , Andy Shevchenko , Sasha Levin Subject: [PATCH 4.14 089/183] device property: Define type of PROPERTY_ENRTY_*() macros Date: Wed, 25 Apr 2018 12:35:09 +0200 Message-Id: <20180425103246.065508027@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Andy Shevchenko [ Upstream commit c505cbd45f6e9c539d57dd171d95ec7e5e9f9cd0 ] Some of the drivers may use the macro at runtime flow, like struct property_entry p[10]; ... p[index++] = PROPERTY_ENTRY_U8("u8 property", u8_data); In that case and absence of the data type compiler fails the build: drivers/char/ipmi/ipmi_dmi.c:79:29: error: Expected ; at end of statement drivers/char/ipmi/ipmi_dmi.c:79:29: error: got { Acked-by: Corey Minyard Cc: Corey Minyard Signed-off-by: Andy Shevchenko Signed-off-by: Greg Kroah-Hartman Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/linux/property.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) --- a/include/linux/property.h +++ b/include/linux/property.h @@ -206,7 +206,7 @@ struct property_entry { */ #define PROPERTY_ENTRY_INTEGER_ARRAY(_name_, _type_, _val_) \ -{ \ +(struct property_entry) { \ .name = _name_, \ .length = ARRAY_SIZE(_val_) * sizeof(_type_), \ .is_array = true, \ @@ -224,7 +224,7 @@ struct property_entry { PROPERTY_ENTRY_INTEGER_ARRAY(_name_, u64, _val_) #define PROPERTY_ENTRY_STRING_ARRAY(_name_, _val_) \ -{ \ +(struct property_entry) { \ .name = _name_, \ .length = ARRAY_SIZE(_val_) * sizeof(const char *), \ .is_array = true, \ @@ -233,7 +233,7 @@ struct property_entry { } #define PROPERTY_ENTRY_INTEGER(_name_, _type_, _val_) \ -{ \ +(struct property_entry) { \ .name = _name_, \ .length = sizeof(_type_), \ .is_string = false, \ @@ -250,7 +250,7 @@ struct property_entry { PROPERTY_ENTRY_INTEGER(_name_, u64, _val_) #define PROPERTY_ENTRY_STRING(_name_, _val_) \ -{ \ +(struct property_entry) { \ .name = _name_, \ .length = sizeof(_val_), \ .is_string = true, \ @@ -258,7 +258,7 @@ struct property_entry { } #define PROPERTY_ENTRY_BOOL(_name_) \ -{ \ +(struct property_entry) { \ .name = _name_, \ }