From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qk1-f169.google.com (mail-qk1-f169.google.com [209.85.222.169]) (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 5D02C366DA1 for ; Fri, 20 Feb 2026 19:29:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.222.169 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771615747; cv=none; b=F7cqO8aipcpRsOgZNzXC8Z3WRMaWeQThlp3mMgfQDizI76ufCx6gaw3R2u7zVkUexSZ+GvByLXP8Z7PLUU1//LxSsDowTELgTR/2WBydOcS8JLFMUUgvFhPqEghkU/xJ0fWqsXoZNS7OMojSJkq/4g/6VdSZcAWkGzmdfl0ceWc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771615747; c=relaxed/simple; bh=ndBy/UTl8yqLz2FYSmSDbHs5J3U/slvt6uXC0nIf+aE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UAiGqY8WFr/FpyoyYtfZRYACqv9bgn8BJZ+biz/yUTkHITyPc1jbi9SC5ERDKF733AJs7VRjyW5VZRGQprYWTs7IxW/wFxUQgHZWQq208lNU/OvC6fVWUQvnGnuM2IiAXPWadZ8lsIsMe8zP9dev5nGndtjcCzvPz8TgHOWUFTU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=kLcsMzso; arc=none smtp.client-ip=209.85.222.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="kLcsMzso" Received: by mail-qk1-f169.google.com with SMTP id af79cd13be357-8c6f21c2d81so228900085a.2 for ; Fri, 20 Feb 2026 11:29:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771615745; x=1772220545; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ndBy/UTl8yqLz2FYSmSDbHs5J3U/slvt6uXC0nIf+aE=; b=kLcsMzsokRJDVoF7f9BR5AUB98vaHDPawErYrEf5rCkLVvRj6HdNuXuUnSw2zb6aqj 5a5B5nOekvgVVzWrgxYICEuu1/C87IY7SPzsJNVrP2mZk7pY0b11G9Ux5dtZ9XZPi0GO JSqineIp8lHcLTsgOj4n0aQfvBuBtHSaXc4IDUGDm3tsyY5YMesu4TqtULx0jMRP51Mr aSo2FMh5hgd7qbM453+ezeyZxBejm2IMictnS5oKx1GitURiRuPSmtVhFEr9fySijzU6 Fri2sWpGc6ftk4B+I1f6RazvIftheeqL0meSx4LKR1vTCNjQZBn4eqGyfBrePmfPKMti fi9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771615745; x=1772220545; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ndBy/UTl8yqLz2FYSmSDbHs5J3U/slvt6uXC0nIf+aE=; b=ENohoSBebBS+xK3zT5m45wh+Siwu2Jl7HvUkDhmh8p7M/wRa37Z2EkDHBRTrrDlRJE mYQulQZlE2qVbOxbsrnH0oDnI5WDV0SzkN95spnUnoNnbrVgaOK8Nfa+MnGuGKadVcWt Y/c2QhjnsSOcArrOEgG7zhQyGW+Yauzw9q54qZ6dkTlE7bAUEAGH7JwgLgx3pzHnx6m6 JbsLAbVMUbps4QEjJPe5CtZFHRKUb3vifBeCm7PNvFSEpP19AZFh3Lmj0fxRTK8yArXd fRiqC19Kor1gjo0NLPEDWQR+Jxipsj45DhKDWIDTKk1YSwbmbtPqRvWd4z3gskjPdpHT OxnQ== X-Forwarded-Encrypted: i=1; AJvYcCXn6MunpGjY3A9jWVaUY0LLOkJYU4DhoWQH+F8QLjGtLfnZtOrkIxrswCr0oxHWjfPJ6fd16TgOU3zFiC4=@vger.kernel.org X-Gm-Message-State: AOJu0Yx4lni1YBLTGPS7lggDimJ+OzDS0+YmeaT3GLXDj0BjM3OEydYF Hx45dZnPQydzmV7V/OCCzjDjvI+Ly0G9OV7/yZG+Xz5G0QxO+q0iAvry X-Gm-Gg: AZuq6aJ102joKR/bFqby4ud8TgLg6rCd2gUzAuRKcINDTXpaf1Qjxd9R3KZTBmoir+C UBjnwLvPEoJwxkQ8JinLQ8As65FmxbPNjgW6+Nva6dM9PVcalGKFX8bjFm1YfYQGw/gGzCnYsVa 4KHC2Bi7GGAhJA377nxcVLmEzbfGPW3stPmpWv+yAEH/VeRXJjQvaMdoCWiVnIxtDDCJpaEnn6T +tbOy1EF96mVVaGDxsYxzIrLqixj+wsXHWpRoAZDAKUi2JZg9p2uPRNmdGot1sx5HXyAq2qk3G6 txyV9s0SEQwvDw/MRn3PGS+o5iKFvdiJQcItGmnl8Eu/tICHG0AzfffddRNGia1yFYm4rAUVOsW L9+tqD8QwH0Tt/WKNJFFYBe1Exb5f5wWPAIn4WbLfMK+WrktzYPH64z/QERFDDf6baSg71B+7FP l2bWC+I7fQAZdO8+tDOT6BFds+EBs8gTKG5ddHzOOVFUh+82n7OPHOOrUh2PzLUfC8uMP9LXuoP IcUxsYxCbRP+7R294rtww== X-Received: by 2002:a05:620a:25ce:b0:89e:b0bd:ced9 with SMTP id af79cd13be357-8cb8ca67641mr80753985a.43.1771615745126; Fri, 20 Feb 2026 11:29:05 -0800 (PST) Received: from Mac.home (bras-base-ktnron0818w-grc-05-142-198-109-43.dsl.bell.ca. [142.198.109.43]) by smtp.gmail.com with ESMTPSA id af79cd13be357-8cb8d0729a3sm23068785a.22.2026.02.20.11.29.03 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 20 Feb 2026 11:29:04 -0800 (PST) From: Neel Bullywon To: jic23@kernel.org Cc: andriy.shevchenko@intel.com, dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v7 1/3] iio: magnetometer: bmc150_magn: use automated cleanup for mutex Date: Fri, 20 Feb 2026 14:29:00 -0500 Message-ID: <20260220192900.79326-1-neelb2403@gmail.com> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20260220103429.22c9eeca@jic23-huawei> References: <20260220103429.22c9eeca@jic23-huawei> 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=UTF-8 Content-Transfer-Encoding: 8bit I don't have the BMC150 hardware unfortunately, so I can't test runtime PM behavior changes directly. For the v8 of patch 1, I see two approaches based on the feedback given: Andy's suggestion: add a bmc150_magn_set_power_mode_locked() helper to deduplicate the lock+call pattern in remove, runtime_suspend, suspend, and resume. Your suggestion: move the guard() unconditionally into bmc150_magn_set_power_mode() itself, which is cleaner but touches the runtime PM locking that you flagged as suspicious. Given I can't test runtime PM, would you prefer I go with Andy's suggestion for now, and leave the deeper runtime PM cleanup for a separate series if someone with hardware can verify it? Or if you'd rather I take a shot at yours with the read_raw() rework you described, I'm happy to do that — just would need someone to test it.