Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1747688rbb; Mon, 26 Feb 2024 22:47:32 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVmUKeMiQL3QEeZUwgM+CnTwnUzbwc60/ON6zWN6ZDVs+ews+b1BLjdC4V9guPzhuEGd7lAiNOaf08wvet+mujGSA08kDiJU/74foxudw== X-Google-Smtp-Source: AGHT+IGoL12w5pqsSRs3IGL0k7/uVBxuAsgE1o2hcxS9ELmY7TDeNM9AJtpYZ5EHT3O6R3bSohPq X-Received: by 2002:a17:902:d511:b0:1dc:b531:82d with SMTP id b17-20020a170902d51100b001dcb531082dmr2095761plg.5.1709016452150; Mon, 26 Feb 2024 22:47:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709016452; cv=pass; d=google.com; s=arc-20160816; b=Fv8gZeEKyi1SgFOGdAiXzNetvRXS/AHrD9j3PF4mqhENsXkeAM41roDsS2RRIF/T4c kdhoLRf6FoG+QbnSzgrM4dJPXjSmcnwmyqGMnDoozXOxy9yPYoLTqgr1qFlWo37MGw/v YE8dG2AKZxCHJcMyOvI2yQMcVJ171J0/svU/iNj8ftpoTNLsVnBoQBaIjsIgwysQRNYZ l48vxYft6i8LypUThmrL3KR/ac5qtFhS/rG0kKRtWj33R+ORZSdCueSl3tTP0PZL7jU3 swH/SnXjT92fu3fJOuduo1pTxdYiWH0iIHLnTfsBebxpKMw3XHfX9resIGGADLbZFb12 Isag== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=hXqI+zcN6Kyg8yDvDhjQmTqttyow+PlffI1J4OY9Sd0=; fh=zpj/NhtlZmAUVw+LETWn1+iLNDALen62hBxLxAry0LE=; b=BsoaMgap6m24/LRWyK6IRpWRyAA76/trArG/AExhwf73UQMg61do1vVFsFptUuFzoA MOoC1ihs/R/VHAzZXrdnWmk1y0x6G4VCop3DhpkMDlG6PTyw75AJgDxr1D/feu0zdM4C ANt3aTesZ6QbUBUqD8QCsTRghdmuGRjutTTNPsS/xTpLqAvVxYIf6ZS4FDP6LQmsUd17 og21q74eO4pR7nKchgg2m6KdtN45MDTce+idk1JaOD8r8+Bhe2Xlw2EoiJFbozCykHqS cRgaQYCgEFSfrElh1HqB5OsX1wN8lM4CzFEGRY711NDoyeX+/WoUjo4N1wwP4QTruVzO OSjg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=LVgIQzsm; 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-82755-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82755-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id jh2-20020a170903328200b001dbf6a7e767si882302plb.59.2024.02.26.22.47.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 22:47:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-82755-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=LVgIQzsm; 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-82755-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-82755-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 D1C69284847 for ; Tue, 27 Feb 2024 06:47:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E17A53395; Tue, 27 Feb 2024 06:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LVgIQzsm" Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45]) (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 11FCD4DA0F for ; Tue, 27 Feb 2024 06:47:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709016444; cv=none; b=X9HQUfLntPCtoq1XZT1uZs49lLsKNItlRkkgCQnDCp+QYiXc7jLo1eV4ZYaH/mV0I1pGeOYnZ5q9prZYytxfx2YKnTrfX8PNTCWuPmBo5IFbO0fFQyogL/1YQvAvFRLbWiMI0vwfJO7tTbm2e6lKgt8HZ+wDh+RMe0ROK7EblsY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709016444; c=relaxed/simple; bh=FQTudPcpkZaTI0zIJDvUPtJ37VPCPjXib0ufIdpEE+E=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=oa59aOJiU/qB37jyFdhRZ1PBazkLcFhVtdj4FLLNONtvlfkZZE1rEnNO6YggrLOggc12BdPQ8nK2cMTlbUIql9clhyZUo8VqYpeFlo0ncbsZ+mViFbOjzzlXvaXnbitPEvb+k+FzmnaBtEZ2NT2eM4jq5d/mzj1m1mE7yPRtjzo= 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=LVgIQzsm; arc=none smtp.client-ip=209.85.128.45 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-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4129a748420so35575e9.0 for ; Mon, 26 Feb 2024 22:47:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1709016441; x=1709621241; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=hXqI+zcN6Kyg8yDvDhjQmTqttyow+PlffI1J4OY9Sd0=; b=LVgIQzsm6UDZpI30PF0zus+O+6w86GSx9qLElY9fqysjEfA7w6PUfDyiyrj2Lw5RJX 9v/uV2ixSb4dvaqw3NrK6/lmPp6gBqXagWNwVsC4EFJPZXXGi80AdeZ4ehIZdhozA9Aq kCUabK0/ctcnmg6dJk3cclxmTB6Cqj4xw2CzeemYBLoGchDQVxhnKOEu75dIl/GIhctf UClJOYVNKKUFgZxapPCh8jymBq5dzPOJK/ubjBqGa2msGm7gFil+bttLfl5DF0tFXCVI cRHf66smthXENdB9lfzaG1W/B2u/q1qp6UNogLJHtVkZbGvgdv8um35/HaHeuIelXVzG YNXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709016441; x=1709621241; h=content-transfer-encoding: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=hXqI+zcN6Kyg8yDvDhjQmTqttyow+PlffI1J4OY9Sd0=; b=IfIVn/vfQ6irv2mlW6sVoxd+AEGeD9lSb7gKNfh9IzqdJz/Mm5rpUsZaeNkpX9EuJD CEzzMUHZK9ma5eSRBp+PKu8/aRpAZ6DfWvf/0zVqfy8faKKcABWOUJEn+yY0+f4HfZ06 335YghxNXItwATayt3b9p/wcgI1wUzHJ0jAhred8QPZ59OUzpnUYnYCkMkc5gqDhG5q1 ofZVouzxSErtAA3opcS/w3SiQWxivgg4N+VdXmTgGVHqP9fwkQD+QlepiC9J9KbyBpst vc8eFzjUsMpdrAFPXf0LMEYiksKLKsc0bf6NPtYwIXf2RSp1CykX7WLSrPrzWomAphMj Se8Q== X-Forwarded-Encrypted: i=1; AJvYcCUvzaoUY4yDPJdxZ7wbzOdj/cVBBjPPvRyI/NLkCbdJcjT2qwcld/OW6WFVE8VgdI22Xs6cr2cC9XToBvSX3FRawbRq3U1sZZip9eig X-Gm-Message-State: AOJu0YyHebLP0UQn2o0FN8fdbwSpUCouFSOe8fFUbQ+g4eucZ8EtKJ6n BCSEPcxVJ0onIKgkrndwrHrVxga7GQMKDBXN5eXnStwofB743jmttRUu+z6KZ0x6TLJg/kKE7I8 O8LZ4cIm481GO9RcXyFbfZGLdvnlBTvNeetO+ X-Received: by 2002:a05:600c:500b:b0:412:a4a5:dec6 with SMTP id n11-20020a05600c500b00b00412a4a5dec6mr87731wmr.1.1709016441361; Mon, 26 Feb 2024 22:47:21 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20240223143833.1509961-1-guanyulin@google.com> In-Reply-To: From: Guan-Yu Lin Date: Tue, 27 Feb 2024 14:47:00 +0800 Message-ID: Subject: Re: [PATCH v3] PM / core: conditionally skip system pm in device/driver model To: Andy Shevchenko Cc: rafael@kernel.org, pavel@ucw.cz, len.brown@intel.com, gregkh@linuxfoundation.org, rdunlap@infradead.org, james@equiv.tech, broonie@kernel.org, james.clark@arm.com, masahiroy@kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Feb 26, 2024 at 10:03=E2=80=AFPM Andy Shevchenko wrote: > > On Mon, Feb 26, 2024 at 05:15:00PM +0800, Guan-Yu Lin wrote: > > On Fri, Feb 23, 2024 at 11:18=E2=80=AFPM Andy Shevchenko > > wrote: > > > On Fri, Feb 23, 2024 at 02:38:29PM +0000, Guan-Yu Lin wrote: > > ... > > > > > + if (kstrtoint(buf, 0, &ret)) > > > > > > Why is it int? It seems like flags, should not be unsigned as u32 or = so? > > > > The ".event" member in struct pm_message is an int, but the values > > assigned to it are used like bit flags (e.g. PM_EVENT_FREEZE=3D0x1, > > PM_EVENT_SUSPEND=3D0x2, PM_EVENT_HIBERNATE=3D0x4). Is this an intention= al > > design choice? We might need to change the design accordingly. > > It might give a subtle errors related to promoted signdness. > Should we refrain from using the bitwise operation here? Or should we just change the type here to u32? > -- > With Best Regards, > Andy Shevchenko > >