From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7FC53C04AB6 for ; Tue, 28 May 2019 19:35:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A577208C3 for ; Tue, 28 May 2019 19:35:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="rXcGLcB6" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727182AbfE1TfA (ORCPT ); Tue, 28 May 2019 15:35:00 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:36566 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726841AbfE1Te7 (ORCPT ); Tue, 28 May 2019 15:34:59 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rUU10bSnv0YXJiC2xFyWmRqh3IXyVKamEkmDXtM74U8=; b=rXcGLcB6GAQVoSWCWlTXafH2hR 92ZKiRZrIkSX5EW9L3ZsQfYbnmWsehe4IscpjNS/kJY0uZ6ZHW+siXqMG6PFLIS293SsZ7Kihz1wX DhQIW9cqm8zVp8ACAwkIYXEXYPcj9IVyzJlCvf7JmeVpapGF3WMC2o1nBhFU9mi4aeww=; Received: from andrew by vps0.lunn.ch with local (Exim 4.89) (envelope-from ) id 1hVhrx-0002ZI-VW; Tue, 28 May 2019 21:34:45 +0200 Date: Tue, 28 May 2019 21:34:45 +0200 From: Andrew Lunn To: Guenter Roeck Cc: Marek Vasut , netdev@vger.kernel.org, Florian Fainelli , Heiner Kallweit , Jean Delvare , linux-hwmon@vger.kernel.org Subject: Re: [PATCH V5] net: phy: tja11xx: Add TJA11xx PHY driver Message-ID: <20190528193445.GU18059@lunn.ch> References: <20190517235123.32261-1-marex@denx.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org On Mon, May 27, 2019 at 08:44:24AM -0700, Guenter Roeck wrote: > >+static u32 tja11xx_hwmon_in_config[] = { > >+ HWMON_I_LCRIT_ALARM, > >+ 0 > >+}; > >+ > >+static const struct hwmon_channel_info tja11xx_hwmon_in = { > >+ .type = hwmon_in, > >+ .config = tja11xx_hwmon_in_config, > >+}; > >+ > >+static u32 tja11xx_hwmon_temp_config[] = { > >+ HWMON_T_CRIT_ALARM, > >+ 0 > >+}; > >+ > >+static const struct hwmon_channel_info tja11xx_hwmon_temp = { > >+ .type = hwmon_temp, > >+ .config = tja11xx_hwmon_temp_config, > >+}; > >+ > >+static const struct hwmon_channel_info *tja11xx_hwmon_info[] = { > >+ &tja11xx_hwmon_in, > >+ &tja11xx_hwmon_temp, > >+ NULL > >+}; > >+ > You might want to consider using the new HWMON_CHANNEL_INFO() macro > to simplify above boilerplate code. Hi Guenter That is a nice simplification. Could you run the semantic patch in drivers/net/phy and submit the results. Thanks Andrew