Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp695584lqd; Wed, 24 Apr 2024 14:09:54 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUNugklE1OLFQO/eN5xGKi10i8hd8wy6v621v9BOdJnkbpylRz2FAMaGwfM7JJ/uiWptle2CR6yXvbwifluluw3Q7ICREYf5dedpSTq3A== X-Google-Smtp-Source: AGHT+IG7lSqxeYWfQHI326dTXIHbqhnWp1tygEWztXCsr6gRglrL4vT2TDycnDU/Zj7Ut7rpBj4s X-Received: by 2002:a05:6871:7823:b0:233:d4b3:9b30 with SMTP id oy35-20020a056871782300b00233d4b39b30mr4041038oac.1.1713992994102; Wed, 24 Apr 2024 14:09:54 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713992994; cv=pass; d=google.com; s=arc-20160816; b=AIkh0ipTsg+nMw97mlvwUcz9fniAfF7efEILlMNnwWFHLbZQrq/oirAs/OLMubf767 PNrC+3VFOTQN22Pjjy/072mhtLn/ny+0q7HG5QwhBYYbzHq8Vtgs4hZFpQMbeXniQZn+ SY1iDt7A+MKMJtjAEmW7HZZMindCsPQnQWvFQ8zgbtwDDedJ/YoycUxUX6oqwFxDpJvg RuQ7bFZv1iXzAgfMf0MBQhPmvx+BqOeieoz24604YGcH3ZnnLF7tUnmZR66tExN5t4/z SLBXAtZdmqv7BYPV9Qt+Okckiwqis1JnnP2JCm7tE/PUreG8BHE90ke4K+tOMglra8wZ q5Cw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:date:to:cc:from:subject:references:in-reply-to :content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:dkim-signature; bh=8cawcgo1tOgGhsGKVAbCRMDNjv22tJkkF0Zk4SpDJrs=; fh=FKDLDz3PNgWTBLbJ7XFp5X/0mrpXdrksVY7kZ9OQPL4=; b=u6s/isVb0WckuDdARfP54k8Wg4XBM034ZAuNtEUNB6FjYRcMAF3yW2YlPwGIEplwBz BJnY0Q9bNWJbx7JksggLFw+9BVAFZQvIXWC8MN5DQPpbn8AJq5DL1hjYXpi470z1osku nQsL00uf3pvKT7Nmqqiq98aHnhsOTucDFyjyCIaS0kJ5PLwknPOt1PLs4cXF1e/JMa5w Pxhq8PEpCYF4PN2f4nucllN8q7Hnnem9DngNuo9Hz2AkkgCJRkrQK0xdHpbt8Ep4L1Zu 5sQDzUryHtvw+5J1rUXw7Xqi8r5kM3dPnBeDwM0k9m50W1NZUV24T+Fs9E2g35EjcChB aElA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="Un/WangW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157723-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id k33-20020a635a61000000b005dc49a8cea8si11803885pgm.376.2024.04.24.14.09.53 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 14:09:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157723-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=@kernel.org header.s=k20201202 header.b="Un/WangW"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-157723-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157723-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 9D8C02865CC for ; Wed, 24 Apr 2024 21:09:53 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E20C4156980; Wed, 24 Apr 2024 21:09:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Un/WangW" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1020215698B; Wed, 24 Apr 2024 21:09:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713992987; cv=none; b=gEPHiF91JUe+vR5phP3eCvxLF7t4HyPe0o+/DyvE6q0hgKSEZTVobbhRrW1RrEzGTw1423xWvcMwXc10M+e0Q2WDLL3Um59xcYzfoI1QZzdLEptpe5uU+9U1dCgyYNE/K9DVtTtbQUEnV0ZsuNRUIabBnbjSb9sj6DSR0Wk+qFU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713992987; c=relaxed/simple; bh=7D4fUL5psJBJkbBj2WQ9TWfJZkuflavBhvgCZyPDfYM=; h=Message-ID:Content-Type:MIME-Version:In-Reply-To:References: Subject:From:Cc:To:Date; b=RGtmuj5f/11Ncs4rVYUlQvRURHkG41be3YCQQYdiYynDGmUE3uJr1C1nuQz4gyI0Ley/2FPRsHx1/WpO8Zn7nCyQxTME+jgwWBGBXvCPDKK0lofCkHsG+No/iYZe7E4Eo0jFKeFL8yis2ps5RehspCUWTFEiw9aZ3LBWvRJQrgM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Un/WangW; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8759AC113CD; Wed, 24 Apr 2024 21:09:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713992986; bh=7D4fUL5psJBJkbBj2WQ9TWfJZkuflavBhvgCZyPDfYM=; h=In-Reply-To:References:Subject:From:Cc:To:Date:From; b=Un/WangW4AqJvJVc9j+Woei1x5ZF7h6C4RRF1HE/47sduzAIddua6R9tWpcTkUhdN QCi2FMMbNZTRpM2rkUUr270oAotl/sXOI1pzu4M/QmNTKQ97wGkd759pXqSidCR9xS cP42IQUElaX2lHspIGcSREFb1ip1rb0L80UKBv4vwXltLbORLdor8+PKKCFJhFeE7w vnOVJUiISBUpxI4wL4AK+8zwEcNNHrFoIqBNbzQfHMnY63FIrT0k3gDkFBntwjOe71 pWHI54a8uLEsZfrkVyknxo2z4FJsBmPDo7zfZZ3c5Hls80O4bYMqoE0e4UK0JmJTOV ogvm10FnwVhiw== Message-ID: <46c9baab4b3a834c27949b99668a9c30.sboyd@kernel.org> Content-Type: text/plain; charset="utf-8" Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: <20240424-glazing-handsaw-4c303fef4f7e@spud> References: <20240424-strangle-sharpener-34755c5e6e3e@spud> <722f31da34e5e1cfef05fb966f6c8c96.sboyd@kernel.org> <20240424-glazing-handsaw-4c303fef4f7e@spud> Subject: Re: [PATCH v2] clock, reset: microchip: move all mpfs reset code to the reset subsystem From: Stephen Boyd Cc: linux-riscv@lists.infradead.org, Conor Dooley , Philipp Zabel , Daire McNamara , Michael Turquette , linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org To: Conor Dooley Date: Wed, 24 Apr 2024 14:09:44 -0700 User-Agent: alot/0.10 Quoting Conor Dooley (2024-04-24 13:19:04) > On Wed, Apr 24, 2024 at 11:33:32AM -0700, Stephen Boyd wrote: > > Quoting Conor Dooley (2024-04-24 01:42:08) > > > diff --git a/drivers/reset/reset-mpfs.c b/drivers/reset/reset-mpfs.c > > > index 7f3fb2d472f4..710f9c1676f9 100644 > > > --- a/drivers/reset/reset-mpfs.c > > > +++ b/drivers/reset/reset-mpfs.c > > > @@ -121,11 +135,15 @@ static int mpfs_reset_probe(struct auxiliary_de= vice *adev, > > > { > > > struct device *dev =3D &adev->dev; > > > struct reset_controller_dev *rcdev; > > > + struct mpfs_reset *rst; > > > =20 > > > - rcdev =3D devm_kzalloc(dev, sizeof(*rcdev), GFP_KERNEL); > > > - if (!rcdev) > > > + rst =3D devm_kzalloc(dev, sizeof(*rst), GFP_KERNEL); > > > + if (!rst) > > > return -ENOMEM; > > > =20 > > > + rst->base =3D (void __iomem *)adev->dev.platform_data; > >=20 > > Can use dev_get_platdata() here? > >=20 > > rst->base =3D (void __iomem *)dev_get_platdata(dev); > >=20 > > That's sad that a cast is necessary. Does it need __force as well? An > > alternative would be to make a container struct for auxiliary_device and > > put the pointer there. >=20 >=20 > Ye, I dunno if it was sparse that yelled at me, but either it or the > compiler didn't approve. I don't really like the casting in and out, but > the alternative I don't find elegant either, so I picked the one I deemed > simpler. I'm happy to go with whichever you prefer. I don't really care. Am I supposed to pick this patch up? >=20 > And re: __force, AFAIU that's only required while discarding the > __iomem, so the cast into the platform_data has one: > adev->dev.platform_data =3D (__force void *)base; >=20 Ah, ok. Thanks for the remind.