Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2927060pxk; Mon, 28 Sep 2020 04:06:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyTfOqsHxJ6OSYxvFIuOno/fR5VJ+eVG2srNgs7uq4lezH4wnHDM7fhCqHsF5b7tdsc1TuT X-Received: by 2002:a50:8e52:: with SMTP id 18mr1109424edx.28.1601291201371; Mon, 28 Sep 2020 04:06:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601291201; cv=none; d=google.com; s=arc-20160816; b=RCxCplJPHhoAftBCPa22C/PX9maKX3sj8qoXOjAgAUPXktOMWCyazFwsYbLYVdhH53 4Ds2lwxC1ADiP5wYN3vw9OQPxJ4R3ZXkWPA8YOz7CwryhdSyJlbSMucMiZFMoW9BGCye 6hBVtOAOUfIYdD5jh00+2F/HTofFYLbyWuSfk3FBAjVKezEL+CN3XgmsXk3BP+x0y35P VaET6jMY26LnYxhaCEFHfEtVcuyX3I8VTkd39jAYNy8GXtfPRfsYkDQKBRBQ7IdgU95A 8lJENHrhZOMIqsXlH3zb9CTW5DCH1jFMWl7DtAYFyCRY5lTlamxX5w5zEJxK75WjtsiZ LotQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :message-id:date:subject:cc:to:from; bh=QNY8xp9BfCFRpTBW2aGnDVUXxTo0y6WgR36tE3JiEYw=; b=WRt9tSAU2vu3B/gBRVdJj9uAbHz2qY+EbiiBiVbx3mkeTKaKqkDVQeWIv87KNs/C1G 9AKRXEwukSKo0QrB/VO+YITyW7tvWwaRksmfIlS8cIKTkK/JRQqOO/crMNlJw10xkWnS YYpDhNHPeldFzfVWmdNa78hGoU63v3nioZhfFzfy/1LJ8EtKVW1nNFbNEBbZYE7gWgQ1 2qt5ZgTXXlv04s5zUTv2vLjV/oovKBoZJsrjnAoWFbz0IfQaTlF2VPU+CJJes8gaYKy1 pZOnfZqn4ja/e97+KGkqYZrrWZN2ptz1SnaPiXwoarJDJhJ5T5pBiqHnHgMrH+vR6FNc 7CAA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y12si370172edv.98.2020.09.28.04.06.17; Mon, 28 Sep 2020 04:06:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbgI1LFN (ORCPT + 99 others); Mon, 28 Sep 2020 07:05:13 -0400 Received: from mail.thorsis.com ([92.198.35.195]:58959 "EHLO mail.thorsis.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726564AbgI1LFN (ORCPT ); Mon, 28 Sep 2020 07:05:13 -0400 Received: from localhost (localhost [127.0.0.1]) by mail.thorsis.com (Postfix) with ESMTP id ECF36356D; Mon, 28 Sep 2020 13:05:11 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail.thorsis.com Received: from mail.thorsis.com ([127.0.0.1]) by localhost (mail.thorsis.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SFeq2_G8OJ3c; Mon, 28 Sep 2020 13:05:11 +0200 (CEST) Received: by mail.thorsis.com (Postfix, from userid 109) id C896B36BC; Mon, 28 Sep 2020 13:05:11 +0200 (CEST) X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,NO_RECEIVED, NO_RELAYS autolearn=unavailable autolearn_force=no version=3.4.2 From: Alexander Dahl To: Pavel Machek Cc: Alexander Dahl , linux-leds@vger.kernel.org, devicetree@vger.kernel.org, Jacek Anaszewski , Dan Murphy , Rob Herring , linux-kernel@vger.kernel.org, Peter Ujfalusi , Marek =?ISO-8859-1?Q?Beh=FAn?= , Denis Osterland-Heim Subject: Re: [PATCH v5 1/3] leds: pwm: Remove platform_data support Date: Mon, 28 Sep 2020 13:04:59 +0200 Message-ID: <11962635.BNa8PrgvAO@ada> In-Reply-To: <20200919094418.GC12294@duo.ucw.cz> References: <20200919053145.7564-1-post@lespocky.de> <20200919053145.7564-2-post@lespocky.de> <20200919094418.GC12294@duo.ucw.cz> Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Pavel, Am Samstag, 19. September 2020, 11:44:18 CEST schrieb Pavel Machek: > > Since commit 141f15c66d94 ("leds: pwm: remove header") that platform > > interface is not usable from outside and there seems to be no in tree > > user anymore. All in-tree users of the leds-pwm driver seem to use DT > > currently. Getting rid of the old platform interface will allow the > > leds-pwm driver to switch over from 'devm_led_classdev_register()' to > > 'devm_led_classdev_register_ext()' later. > > > > @@ -61,6 +56,7 @@ static int led_pwm_set(struct led_classdev *led_cdev, > > > > return pwm_apply_state(led_dat->pwm, &led_dat->pwmstate); > > > > } > > > > +__attribute__((nonnull)) > > > > static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, > > > > struct led_pwm *led, struct fwnode_handle *fwnode) > > > > { > > This normally goes elsewhere -- right? I'd expect: > > > static int led_pwm_add(struct device *dev, struct led_pwm_priv *priv, > struct led_pwm *led, struct fwnode_handle *fwnode) > __attribute__((nonnull)) I found both variants in kernel code. I can live with both variants and have no strong preference. My initial intention to add it was to get a compiler warning in case someone does not pass a fwnode here, e.g. when using that old platform_data approach (which is supposed to be removed with this patch). You might call it a self check on my own changes. I can also drop that attribute if you don't want that kind of stuff in linux-leds. Greets Alex