Received: by 2002:a05:7412:2a91:b0:fc:a2b0:25d7 with SMTP id u17csp256271rdh; Tue, 13 Feb 2024 16:27:21 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXOL9ZvxCWjA3LCwRtdMvYN5PyY3FHntN+5HJvZbQWCgAHiTWcDKuQF4tPduokDY0A0C3yEY9Cnpp66+FaZjokaOgGQ1fL+NEvR5LwEXQ== X-Google-Smtp-Source: AGHT+IEIp5/ahGg7SCXZHaMg838DB+hLhRwl1ltPXp/53dmBwKOp4PS4Im0sFOXSr6b0qUlJ/xDM X-Received: by 2002:a05:6870:ed88:b0:21a:40e0:1e99 with SMTP id fz8-20020a056870ed8800b0021a40e01e99mr1345275oab.6.1707870440947; Tue, 13 Feb 2024 16:27:20 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707870440; cv=pass; d=google.com; s=arc-20160816; b=w8ZYP5qAiKtgUwC4tmKJ0j/74ERD6relqeTxCfldC/AytqLclwTW16mq6YTYLXlj6O njrgdPNWZZFo3UNQgJYPnbR4ukfeEKlSgBNnjOT5w9AYO09iqAONblNPoCFwAz5GbZRw E9DZOdIv2g9nOgS8idknS4QJBv5XBBcyCptHJu8eecro64W1u4QAPyqWIseV489fd08T 1jqrWp22p6CzCLh4qvp92+ml8gza8LVNBAuCxVHJXKnSUNNfvTOtEhtY9D9HyM7Xks5h bH+nr0+TyR6MroB6wSqM9OW/pmXyHJaATiuX9/h5xq9dtsmkq1Y2NIYc7yzngZ3WPzdz DbWg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=p5T7AJQgyciJK6sFO1yWt0ErtUqKT+irq43WlU30JPg=; fh=xEz5zYNl7Yo4c0scK0T6VY81cYe1Ez40qc4Ay8iiGHk=; b=uyOiiONCp6kdiwJWz4YvLTxy8OEP3rE01j5ACQYfvbh1v8+NThW9BFM7391CLU4pa4 k1DbVD8H+3rYNUQZcIty/gaqo+ifU2j4muE9yU93Blp34MsvaQPCwHJL64KdKiwcn5HS O0nhHtBkmSWQj/HGiUTyhPxm2+RDmL8qeFk1ss8fxlNj9lc8l0twA8VgunVkSBBlX6DX 3WImOhXZB+/QEBkOCwdK1YxTFY26ixLcyRAZ6AdunyaA5U9+lV38tSAeMwBsHGazMClW 4zbiSgVPBJl0v21PzHW/8y9R0surXA4Eud4u26ltoGCiJutXUhQP+wOmnX0r2za0lha2 v9XQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qE8BYa6o; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64609-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com X-Forwarded-Encrypted: i=2; AJvYcCXAQW3HwQLuQQZ6f0AVTlINmvd3kHoBM03/C0jUken4JuUuUJNNm9S/YKBM6AocO8soP28tdZDHYTB6MIPKaQLzXkRyeVQ6mt8stJN7vg== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id bo3-20020a056a02038300b005dc4190c756si3026453pgb.866.2024.02.13.16.27.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 16:27:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-64609-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=qE8BYa6o; arc=pass (i=1 spf=pass spfdomain=google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-64609-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-64609-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 921F9282888 for ; Wed, 14 Feb 2024 00:27:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94B2F28FD; Wed, 14 Feb 2024 00:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="qE8BYa6o" Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CBFE5623 for ; Wed, 14 Feb 2024 00:27:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707870434; cv=none; b=PCFeL6B56UpoqAoq+3xf8O2dVq6xAVkBJ0w6bw7IagtthCdUTIg628lJ1ozKtkCIZq/HA/SFKFqgev2bU2CH56VLmsIfukCxdNkEjii3h5HMbgsdogpWWBWudrYbSGkaCuNgEfTlTiDB3CeFKZi3Vn4gaaVml0T59VYQV/IA+gc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707870434; c=relaxed/simple; bh=yDHy5RDbymgdUKbLBpcBU7q0gdC36wyOUaU6V100yVw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=YTqFstdvgNOGpxW3F3NalY74cdAlr11Y3N6lKQgCLrKz3lwQPEK1s7VvzduhSsuBf0udw7pU6Du+zKlQtDkaBtIxdAghKxze2Pnilp0MUSs+BvjGdYUeZQTPeCTeWJW0Ldu9FRl3Ol9hj4etpfoKNnFxbN+pEq+dj1H9RP1IY9o= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=qE8BYa6o; arc=none smtp.client-ip=209.85.166.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=google.com Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-7bade847536so292001439f.0 for ; Tue, 13 Feb 2024 16:27:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1707870432; x=1708475232; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=p5T7AJQgyciJK6sFO1yWt0ErtUqKT+irq43WlU30JPg=; b=qE8BYa6oiXX5ejRLIaPeiKOGwB8YuATJIpdpvEeLRwIzMsCCsr6RFSq/RIaS4kSw6G f10YESh55qkxUVM4bQf0T4un8I41f79UUQoT/E6rfk5u20iEuwgKSK4tKWeN9Vk/xu3e 4qyBnHQrDTMj+d7WwYGXzGaNGAe649S+7pXnk9tkIH8C//sHrjqVMp+ncHfTGvfExtBU bZHFxg9uid2R37K5lmlQzBojdmbwA2D4D4xSCEYJzodl2D03Z+dFP4KhrQPy6CR4ncf9 B70D9RRChqwEXROCfeFUYAnhTs+nJCRI/GUTaIq7Vuc9zY5CVUPMQFCMl6dg94vjW5Mw +deg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707870432; x=1708475232; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=p5T7AJQgyciJK6sFO1yWt0ErtUqKT+irq43WlU30JPg=; b=wB3U7BvzT4vFNIb4zkmY0WHxRbyJ1n1iaI0o2O5u3Xm9PLta2BzvAbyi/4sRtlu0hN xfA9FnNeiuAxJC4w3HgJ+xeR763AYD9onHRxkTF+nlSYEkOIaS+rBt8EuN6PSvvW+5eu n6zHtOO8uWNYcWdXzS0wWenPmQzwih+GKkFuFYIk+NJ5d2UCmMXEy7NVVheBS+xLYD/O EjKimg5+c0A2Kg5LaY0MqyscDxoxs6z5HT4wBR+zOF08EBpKV8gyYNuBfc1pvwtQZqCs MOohWg5RdZx6NvcVFP4HUQTi0zCw/9PLTmrAHuNxOrzNwuP8IfovlZI60aKS2twRQ+sU jwRQ== X-Forwarded-Encrypted: i=1; AJvYcCV5TmxdFF1QPxdk/lmTlx7jGLLEsOvEtC4Tb3ti1q72UXtNT9TtK9yppqPHtAuT9L2a2/SeyiRK8CKLh6bq8wbuEB2L9+n941ykHqxq X-Gm-Message-State: AOJu0YyjlyTgxwom+skZ5Kc+MaMh3ohgt5daEbnTnt12lnl89kiiNE8u 4ET6HLRyOZPY7hSR5qE7rWgMJbTyAWrCdP68FngUknXWMY3y7gHejoNARjmunw== X-Received: by 2002:a05:6602:1c3:b0:7c4:19c7:646a with SMTP id w3-20020a05660201c300b007c419c7646amr1528777iot.19.1707870431645; Tue, 13 Feb 2024 16:27:11 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCXKbZdIao3MuWR588UKr53QbpcAZKhB9kXOjFoOwymzV+XRimiyLDuoM9Vs57HxOeDppfShIb00Z/u6rJ/tcurfJC3aTiIHy1JRA9nuzvdJSQyVigWL++i27Tg6fIAUmRPs3pe2p+FtKb8rdbUMwpszXHSfCYQ8lYx38ofWsyV43KntDzujWzjLLSYTYoTLz3/NQjxi7/US3Au353TFVbFIwDOwxfHDJfrUod67S4qui5i1m/1IHpqXQQ8wnRjb8MTF97izsHtcc/FdPHceEDqvEzUcFd3/ar9ByItkSBO9/+ufMNWKR/VqijYcxsIvZSPceDEMFIXWklvAyj1SFYHkWcQ5tDpEWTfPAvBv2CiYeyyLsoEeJXsoz8uTOZZuo2pDMSlEFzbAPlrHbAeBfQJJPM17PdZXYkPCbH0wUEjQyBL/W9YvrBKJV/h/Xh6m+14cbyX11OSRs9vYRixUqjBQBfEct7pfYePjSPdHykil6zADzWKQp4GEBbBYxlESGl2IAPVmFP5hsrMppTcEWxjF2HY22Cx0LgkOQRCIACoGIRiPq0cj6S3iAoDhbjgIvMmD+SLjXHsNtqaZMzM= Received: from google.com (20.10.132.34.bc.googleusercontent.com. [34.132.10.20]) by smtp.gmail.com with ESMTPSA id cp27-20020a056638481b00b0047140ce03casm2180833jab.22.2024.02.13.16.27.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 16:27:11 -0800 (PST) Date: Wed, 14 Feb 2024 00:27:08 +0000 From: Justin Stitt To: Jerome Brunet Cc: Mark Brown , Arnd Bergmann , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Neil Armstrong , Kevin Hilman , Martin Blumenstingl , Nathan Chancellor , Nick Desaulniers , Bill Wendling , alsa-devel@alsa-project.org, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: Re: [PATCH v2 2/2] ASoC: meson: t9015: fix function pointer type mismatch Message-ID: <20240214002708.bhpvpt7cv7o4os5t@google.com> References: <20240213215807.3326688-1-jbrunet@baylibre.com> <20240213215807.3326688-3-jbrunet@baylibre.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240213215807.3326688-3-jbrunet@baylibre.com> Hi, On Tue, Feb 13, 2024 at 10:58:04PM +0100, Jerome Brunet wrote: > clang-16 warns about casting functions to incompatible types, as is done > here to call clk_disable_unprepare: > > sound/soc/meson/t9015.c:274:4: error: cast from 'void (*)(struct clk *)' to 'void (*)(void *)' converts to incompatible function type [-Werror,-Wcast-function-type-strict] > 274 | (void(*)(void *))clk_disable_unprepare, > > The pattern of getting, enabling and setting a disable callback for a > clock can be replaced with devm_clk_get_enabled(), which also fixes > this warning. > > Fixes: 33901f5b9b16 ("ASoC: meson: add t9015 internal DAC driver") > Reported-by: Arnd Bergmann > Signed-off-by: Jerome Brunet Reviewed-by: Justin Stitt > --- > sound/soc/meson/t9015.c | 20 ++++---------------- > 1 file changed, 4 insertions(+), 16 deletions(-) > > diff --git a/sound/soc/meson/t9015.c b/sound/soc/meson/t9015.c > index 9c6b4dac6893..571f65788c59 100644 > --- a/sound/soc/meson/t9015.c > +++ b/sound/soc/meson/t9015.c > @@ -48,7 +48,6 @@ > #define POWER_CFG 0x10 > > struct t9015 { > - struct clk *pclk; > struct regulator *avdd; > }; > > @@ -249,6 +248,7 @@ static int t9015_probe(struct platform_device *pdev) > struct t9015 *priv; > void __iomem *regs; > struct regmap *regmap; > + struct clk *pclk; > int ret; > > priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > @@ -256,26 +256,14 @@ static int t9015_probe(struct platform_device *pdev) > return -ENOMEM; > platform_set_drvdata(pdev, priv); > > - priv->pclk = devm_clk_get(dev, "pclk"); > - if (IS_ERR(priv->pclk)) > - return dev_err_probe(dev, PTR_ERR(priv->pclk), "failed to get core clock\n"); > + pclk = devm_clk_get_enabled(dev, "pclk"); > + if (IS_ERR(pclk)) > + return dev_err_probe(dev, PTR_ERR(pclk), "failed to get core clock\n"); > > priv->avdd = devm_regulator_get(dev, "AVDD"); > if (IS_ERR(priv->avdd)) > return dev_err_probe(dev, PTR_ERR(priv->avdd), "failed to AVDD\n"); > > - ret = clk_prepare_enable(priv->pclk); > - if (ret) { > - dev_err(dev, "core clock enable failed\n"); > - return ret; > - } > - > - ret = devm_add_action_or_reset(dev, > - (void(*)(void *))clk_disable_unprepare, > - priv->pclk); > - if (ret) > - return ret; > - > ret = device_reset(dev); > if (ret) { > dev_err(dev, "reset failed\n"); > -- > 2.43.0 > Thanks Justin