linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Artem Shimko <artyom.shimko@gmail.com>
Cc: Artem Shimko <artyom.shimko@gmail.com>,
	Elie Morisse <syniurge@gmail.com>,
	Shyam Sundar S K <shyam-sundar.s-k@amd.com>,
	Andi Shyti <andi.shyti@kernel.org>,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/1] i2c: amd-mp2-pci: Simplify PM code using DEFINE_RUNTIME_DEV_PM_OPS
Date: Mon,  8 Sep 2025 15:11:51 +0300	[thread overview]
Message-ID: <20250908121153.754120-1-artyom.shimko@gmail.com> (raw)
In-Reply-To: <202509070541.ilqlMkml-lkp@intel.com>

Hello maintainers and reviewers,

Fix build errors when CONFIG_PM is disabled by:

Removing #ifdef CONFIG_PM guards around suspend/resume function
declarations in i2c-amd-mp2.h

Removing #ifdef CONFIG_PM guards around suspend/resume function
assignments in i2c-amd-mp2-plat.c

Keeping the suspend/resume function pointers defined but unused
when CONFIG_PM is disabled, as the common structure should have
consistent layout regardless of PM configuration

This change reduces preprocessor conditional complexity and ensures
better code elimination for non-PM configurations while maintaining
build correctness in all config scenarios.

Thank you for your consideration.

Best regards,
Artem Shimko

ChangeLog:
        v2:
        * Fixed build errors when CONFIG_PM is disabled by properly
        handling suspend/resume function pointers in i2c-amd-mp2.h
        and i2c-amd-mp2-plat.c

drivers/i2c/busses/i2c-amd-mp2.h | 4 +---
drivers/i2c/busses/i2c-amd-mp2-pci.c | 9 +++------
drivers/i2c/busses/i2c-amd-mp2-plat.c | 5 +----
3 files changed, 5 insertions(+), 13 deletions(-)

-- 
2.43.0


      parent reply	other threads:[~2025-09-08 12:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-06  0:12 [PATCH 0/1] i2c: amd-mp2-pci: Simplify PM code using DEFINE_RUNTIME_DEV_PM_OPS Artem Shimko
2025-09-06  0:12 ` [PATCH 1/1] " Artem Shimko
2025-09-06 21:26   ` kernel test robot
     [not found]     ` <20250908115942.752356-1-artyom.shimko@gmail.com>
2025-09-08 11:59       ` [PATCH v2 0/1] " Artem Shimko
2025-09-08 12:11     ` Artem Shimko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250908121153.754120-1-artyom.shimko@gmail.com \
    --to=artyom.shimko@gmail.com \
    --cc=andi.shyti@kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shyam-sundar.s-k@amd.com \
    --cc=syniurge@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).