From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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 A4DE52DC359 for ; Fri, 17 Oct 2025 09:06:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.51 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760691990; cv=none; b=H5pRI2O+IttxJjUxNpI9FwZ6XRbEe9CNficip7caf/otaiiVH1E+/rsPRDzE8EGzszhkLCBRhn5dYjeZaGsNZgNVAmPdzE4s5aTVQ+GI1tzFOektpRpE5/20qK8EtRKWZxjVA8YbMmPf7f1ueIS8i0QFfi7mV2SSTDwsIVAhcpM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1760691990; c=relaxed/simple; bh=tL9LCQhpKIBjQIgS/5f1KpjSDRPB3nJi2aKghBl0jM4=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=YTanJSVdwGfooef3rLoxA6KsYtsqlLGqq3nkKfsiDg5DUedzGjsvVkZRJcNRCCDVijavx3pXJqfS/8P6iT3VOsu6OBvtWh3xCWdZEu/jctrepr/km7hFwO/XOCa5bRyZ1agdNQ1gUGadN8oR1nqZngj261jRAl6Eagh/O8fpbXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=p8PkJAVR; arc=none smtp.client-ip=209.85.218.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="p8PkJAVR" Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-b3e9d633b78so389729266b.1 for ; Fri, 17 Oct 2025 02:06:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1760691987; x=1761296787; darn=vger.kernel.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=418kpMdDHnOQzzDnjco0/swD3OeHn+l/8evRSWETxr8=; b=p8PkJAVRd2Vo0QVBck6JlHDW4H1DfgmBgUNao/9Nxyt77rBPmQMYnnrLCiL5RkCg9F 7xOKXf3qxLoKusF2/EHXZkz5XcwpmCBC9VQHrhnlqs5rJUJfDNUFkSX/lA2gE7nYJ+Xm E9uBNrUd87yXlyIindIpkJ2u1iZWt5HaVZkijLxikgHQjmUKd6+oLC9YIKv+AiZUJkFb 9j/8iSANWosU8+A+5zyqUOKgpUG8YpPFj4rUtYfiXhauZgIPdHSwOBR/LsFYVled3gcQ le4SDLYgaWgXbzqx8cPJ6UrU3m6tLzByNNerGPfwfG2soIjP6LOC2zEm86p2rMAzwS10 JWig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1760691987; x=1761296787; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=418kpMdDHnOQzzDnjco0/swD3OeHn+l/8evRSWETxr8=; b=szuzdSm+0nt+NXyKNL0GYIUqa5mPY5VAKW2nduECP7+mbH+UwiV4u7SAMQny8d/WzC dMBPTKzRGx7TG/vW5jmO7R3vR8Dr5qF1l2hjgyjrbpjuCZDD2rAMCaAHmNhqFhLDVdIZ 0a82T+f+H4+gYT77ie1ayTOWJSRViZmqiBIKBPnxAFYe0bE/xrh5wL/eCTAC6A2XxVrn zmuMyoWgtUrCfJgyfivVUNMoevOZIwn7xwCghwpQha6QGkrQkzr5Rk//Y54MIlLMn5j/ zypn9JGw6gn9YRj/8pyZH7RIq4OqGZwtedIIZOeP6JE5aaOE4Q+EH6Ls55WDhUDmHGYO 53ww== X-Forwarded-Encrypted: i=1; AJvYcCX6Q0a/mXMBiVm+vDmfSGlVGUYYxKst5p832I7MZPCLjrPbz10W/jnnDf7/LUgw9MiFA+iNIwKSQL+snk3O@vger.kernel.org X-Gm-Message-State: AOJu0YxDgPfyOBcB9opHh2qA+n/XzXEUwRl24t1FiDojH/bRc/vuk3KQ VZhVnHEy0jO0tX4b7aQCtUKAVWujtPQOcOjOVxfxbVHCvHnECqLTeMbi/0CLOHu7eQN91yipaHE IzKrfhR++C1JjYH6Y4zt+veDbvTgxGq/Q53DXEaynMA== X-Gm-Gg: ASbGncsSyf2Jg2Jru67BOlBwSMuTOFcZ5uFpo+9/WFvryHoegdO83k6Q5aQ/YKwBzT6 Qsh5lkVNo6cA9ZjPGAWBtltVTHu4Dqdz/pY0PRmmIVHkVGKM09TUPma+foZieNFV0NkJx/Uyn/9 oGMpAGD2EvJ+KShCd/2IGfn4X6cjUPpmunk9NFzPtE/R+//kmKqQmGoWYbvUchtQlZ8Jm89YfMB cTVAMVS0SDTRsB4sniUrVgW1izHQICA3V7O6K8NC9J6WKKp+7K8x4xvlU53zcrBEYfupLTyLixC 65xEu7PJz3vF9m80fHG5qpmAz3I= X-Google-Smtp-Source: AGHT+IG+w0UsfxJS4d6pFqa8XviZVfLhRM+rhE1KqiFzit259/+EaKQIY+0egVcn1SrXy9IXtpCbr0Z+t9PVc3PXPa4= X-Received: by 2002:a17:907:868f:b0:b41:c602:c75d with SMTP id a640c23a62f3a-b645f7ef255mr378423666b.31.1760691986910; Fri, 17 Oct 2025 02:06:26 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20251015-arm-psci-system_reset2-vendor-reboots-v16-0-b98aedaa23ee@oss.qualcomm.com> <20251015-arm-psci-system_reset2-vendor-reboots-v16-2-b98aedaa23ee@oss.qualcomm.com> In-Reply-To: From: Bartosz Golaszewski Date: Fri, 17 Oct 2025 11:06:15 +0200 X-Gm-Features: AS18NWCSgzHU1qRYaMmAnFnfeUajlPBrTb0Y5_GWRI3iwaw1dVFHqq2mvJmjYc8 Message-ID: Subject: Re: [PATCH v16 02/14] power: reset: reboot-mode: Add device tree node-based registration To: Shivendra Pratap Cc: Bjorn Andersson , Sebastian Reichel , Rob Herring , Sudeep Holla , Souvik Chakravarty , Krzysztof Kozlowski , Conor Dooley , Andy Yan , Mark Rutland , Lorenzo Pieralisi , Arnd Bergmann , Konrad Dybcio , cros-qcom-dts-watchers@chromium.org, Vinod Koul , Catalin Marinas , Will Deacon , Florian Fainelli , Moritz Fischer , John Stultz , Matthias Brugger , Krzysztof Kozlowski , Dmitry Baryshkov , Mukesh Ojha , Stephen Boyd , Andre Draszik , Kathiravan Thirumoorthy , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, Elliot Berman , Srinivas Kandagatla Content-Type: text/plain; charset="UTF-8" On Thu, 16 Oct 2025 at 19:19, Shivendra Pratap wrote: > >> > >> - info = devm_kzalloc(reboot->dev, sizeof(*info), GFP_KERNEL); > > > > This change is good - devres should not be used in subsystem library > > code, only in drivers - but it doesn't seem to belong here, can you > > please separate it out and make it backportable? > > sure. Just to confirm we should separate out the devm_kzalloc part of the > change and add a fixes tag. > And preferably put it first in the series to avoid conflicts. > >> @@ -123,8 +136,11 @@ int reboot_mode_register(struct reboot_mode_driver *reboot) > >> return 0; > >> > >> error: > >> - list_for_each_entry(info, &reboot->head, list) > >> + list_for_each_entry_safe(info, next, &reboot->head, list) { > >> + list_del(&info->list); > > > > Same here, not deleting the entries currently seems like a bug? Do we > > depend on the driver detach to clean up the resources on failure? > > sure, so this should also go as fixes? and should we remove the other > dev_err(printk) also as fixes? or that can still got with the change > where we add fwnode based registration? > It doesn't seem to be strictly required by current code as the users use it "correctly" but if the API becomes used in different ways - for instance the structure may be reused after failure - it's a good idea to backport it. In general we should undo everything we did in the same function if we fail at some point. Bart