From patchwork Sat Aug 23 11:20:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 382430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 25BD51400BB for ; Sat, 23 Aug 2014 21:27:19 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752690AbaHWLZX (ORCPT ); Sat, 23 Aug 2014 07:25:23 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:1746 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752479AbaHWLY6 (ORCPT ); Sat, 23 Aug 2014 07:24:58 -0400 X-IronPort-AV: E=Sophos;i="5.04,386,1406584800"; d="scan'208";a="90829918" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 23 Aug 2014 13:24:53 +0200 From: Julia Lawall To: Thierry Reding Cc: josh@joshtriplett.org, kernel-janitors@vger.kernel.org, linux-pwm@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/9] pwm: lpss: use c99 initializers in structures Date: Sat, 23 Aug 2014 13:20:25 +0200 Message-Id: <1408792831-25615-4-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> References: <1408792831-25615-1-git-send-email-Julia.Lawall@lip6.fr> Sender: linux-pwm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org From: Julia Lawall Use c99 initializers for structures. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @decl@ identifier i1,fld; type T; field list[n] fs; @@ struct i1 { fs T fld; ...}; @bad@ identifier decl.i1,i2; expression e; initializer list[decl.n] is; @@ struct i1 i2 = { is, + .fld = e - e ,...}; // Signed-off-by: Julia Lawall --- The patches in this series do not depend on each other. drivers/pwm/pwm-lpss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pwm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/pwm/pwm-lpss.c b/drivers/pwm/pwm-lpss.c index 4df994f..441a046 100644 --- a/drivers/pwm/pwm-lpss.c +++ b/drivers/pwm/pwm-lpss.c @@ -45,7 +45,7 @@ struct pwm_lpss_boardinfo { /* BayTrail */ static const struct pwm_lpss_boardinfo byt_info = { - 25000000 + .clk_rate = 25000000 }; static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)