public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups
@ 2026-01-12 13:55 Andy Shevchenko
  2026-01-12 13:55 ` [PATCH v1 1/2] i2c: mlxbf: Remove unused bus speed definitions Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-12 13:55 UTC (permalink / raw)
  To: Andy Shevchenko, linux-i2c, linux-kernel
  Cc: Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

Remove dead definitions and reuse HZ_PER_MHZ predefined constant.
No functional changes.

Andy Shevchenko (2):
  i2c: mlxbf: Remove unused bus speed definitions
  i2c: mlxbf: Use HZ_PER_KHZ in the driver

 drivers/i2c/busses/i2c-mlxbf.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

-- 
2.50.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v1 1/2] i2c: mlxbf: Remove unused bus speed definitions
  2026-01-12 13:55 [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andy Shevchenko
@ 2026-01-12 13:55 ` Andy Shevchenko
  2026-01-12 13:55 ` [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver Andy Shevchenko
  2026-01-14  7:36 ` [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andi Shyti
  2 siblings, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-12 13:55 UTC (permalink / raw)
  To: Andy Shevchenko, linux-i2c, linux-kernel
  Cc: Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

The driver had been converted to use standard constants for the bus speed
a long time ago. Remove the leftover definitions.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-mlxbf.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 746f65989138..9f0048044112 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -324,12 +324,6 @@
 		.name = (str) \
 	}
 
-enum {
-	MLXBF_I2C_TIMING_100KHZ = 100000,
-	MLXBF_I2C_TIMING_400KHZ = 400000,
-	MLXBF_I2C_TIMING_1000KHZ = 1000000,
-};
-
 enum {
 	MLXBF_I2C_F_READ = BIT(0),
 	MLXBF_I2C_F_WRITE = BIT(1),
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-12 13:55 [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andy Shevchenko
  2026-01-12 13:55 ` [PATCH v1 1/2] i2c: mlxbf: Remove unused bus speed definitions Andy Shevchenko
@ 2026-01-12 13:55 ` Andy Shevchenko
  2026-01-12 20:33   ` kernel test robot
  2026-01-14  7:36 ` [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andi Shyti
  2 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-12 13:55 UTC (permalink / raw)
  To: Andy Shevchenko, linux-i2c, linux-kernel
  Cc: Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

Use predefined HZ_PER_MHZ constant where it is appropriate.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-mlxbf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 9f0048044112..6c1cfe9ec8ac 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -66,7 +66,7 @@
  * strongly dependent on the core clock frequency of the SMBus
  * Master. Default value is set to 400MHz.
  */
-#define MLXBF_I2C_TYU_PLL_OUT_FREQ  (400 * 1000 * 1000)
+#define MLXBF_I2C_TYU_PLL_OUT_FREQ  (400 * HZ_PER_MHZ)
 /* Reference clock for Bluefield - 156 MHz. */
 #define MLXBF_I2C_PLL_IN_FREQ       156250000ULL
 
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-12 13:55 ` [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver Andy Shevchenko
@ 2026-01-12 20:33   ` kernel test robot
  2026-01-12 20:36     ` Andy Shevchenko
  0 siblings, 1 reply; 11+ messages in thread
From: kernel test robot @ 2026-01-12 20:33 UTC (permalink / raw)
  To: Andy Shevchenko, linux-i2c, linux-kernel
  Cc: oe-kbuild-all, Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

Hi Andy,

kernel test robot noticed the following build errors:

[auto build test ERROR on andi-shyti/i2c/i2c-host]
[also build test ERROR on linus/master v6.19-rc5 next-20260109]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Andy-Shevchenko/i2c-mlxbf-Remove-unused-bus-speed-definitions/20260112-220605
base:   https://git.kernel.org/pub/scm/linux/kernel/git/andi.shyti/linux.git i2c/i2c-host
patch link:    https://lore.kernel.org/r/20260112135603.4150952-3-andriy.shevchenko%40linux.intel.com
patch subject: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
config: i386-buildonly-randconfig-001-20260112 (https://download.01.org/0day-ci/archive/20260113/202601130414.VJyCNWzI-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260113/202601130414.VJyCNWzI-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202601130414.VJyCNWzI-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/i2c/busses/i2c-mlxbf.c: In function 'mlxbf_i2c_probe':
>> drivers/i2c/busses/i2c-mlxbf.c:68:44: error: 'HZ_PER_MHZ' undeclared (first use in this function)
      68 | #define MLXBF_I2C_TYU_PLL_OUT_FREQ  (400 * HZ_PER_MHZ)
         |                                            ^~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:173:41: note: in expansion of macro 'MLXBF_I2C_TYU_PLL_OUT_FREQ'
     173 | #define MLXBF_I2C_COREPLL_FREQ          MLXBF_I2C_TYU_PLL_OUT_FREQ
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:2325:35: note: in expansion of macro 'MLXBF_I2C_COREPLL_FREQ'
    2325 |                 priv->frequency = MLXBF_I2C_COREPLL_FREQ;
         |                                   ^~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:68:44: note: each undeclared identifier is reported only once for each function it appears in
      68 | #define MLXBF_I2C_TYU_PLL_OUT_FREQ  (400 * HZ_PER_MHZ)
         |                                            ^~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:173:41: note: in expansion of macro 'MLXBF_I2C_TYU_PLL_OUT_FREQ'
     173 | #define MLXBF_I2C_COREPLL_FREQ          MLXBF_I2C_TYU_PLL_OUT_FREQ
         |                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/i2c/busses/i2c-mlxbf.c:2325:35: note: in expansion of macro 'MLXBF_I2C_COREPLL_FREQ'
    2325 |                 priv->frequency = MLXBF_I2C_COREPLL_FREQ;
         |                                   ^~~~~~~~~~~~~~~~~~~~~~


vim +/HZ_PER_MHZ +68 drivers/i2c/busses/i2c-mlxbf.c

    55	
    56	/*
    57	 * Note that the following SMBus, CAUSE, GPIO and PLL register addresses
    58	 * refer to their respective offsets relative to the corresponding
    59	 * memory-mapped region whose addresses are specified in either the DT or
    60	 * the ACPI tables or above.
    61	 */
    62	
    63	/*
    64	 * SMBus Master core clock frequency. Timing configurations are
    65	 * strongly dependent on the core clock frequency of the SMBus
    66	 * Master. Default value is set to 400MHz.
    67	 */
  > 68	#define MLXBF_I2C_TYU_PLL_OUT_FREQ  (400 * HZ_PER_MHZ)
    69	/* Reference clock for Bluefield - 156 MHz. */
    70	#define MLXBF_I2C_PLL_IN_FREQ       156250000ULL
    71	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-12 20:33   ` kernel test robot
@ 2026-01-12 20:36     ` Andy Shevchenko
  2026-01-13  7:30       ` Andy Shevchenko
  2026-01-13 13:48       ` Philip Li
  0 siblings, 2 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-12 20:36 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-i2c, linux-kernel, oe-kbuild-all, Khalil Blaiech,
	Asmaa Mnebhi, Andi Shyti

On Tue, Jan 13, 2026 at 04:33:04AM +0800, kernel test robot wrote:
> Hi Andy,
> 
> kernel test robot noticed the following build errors:

Ah, okay, this needs to be based on the series that adds HZ_PER_GHZ as it
provides the needed header inclusion.

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-12 20:36     ` Andy Shevchenko
@ 2026-01-13  7:30       ` Andy Shevchenko
  2026-01-13 13:48       ` Philip Li
  1 sibling, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-13  7:30 UTC (permalink / raw)
  To: kernel test robot
  Cc: linux-i2c, linux-kernel, oe-kbuild-all, Khalil Blaiech,
	Asmaa Mnebhi, Andi Shyti

On Mon, Jan 12, 2026 at 10:36:54PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 13, 2026 at 04:33:04AM +0800, kernel test robot wrote:
> > Hi Andy,
> > 
> > kernel test robot noticed the following build errors:
> 
> Ah, okay, this needs to be based on the series that adds HZ_PER_GHZ as it
> provides the needed header inclusion.

The series I mentioned is this one:
https://lore.kernel.org/r/20260112134900.4142954-1-andriy.shevchenko@linux.intel.com

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-12 20:36     ` Andy Shevchenko
  2026-01-13  7:30       ` Andy Shevchenko
@ 2026-01-13 13:48       ` Philip Li
  2026-01-13 20:42         ` Andy Shevchenko
  1 sibling, 1 reply; 11+ messages in thread
From: Philip Li @ 2026-01-13 13:48 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kernel test robot, linux-i2c, linux-kernel, oe-kbuild-all,
	Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

On Mon, Jan 12, 2026 at 10:36:49PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 13, 2026 at 04:33:04AM +0800, kernel test robot wrote:
> > Hi Andy,
> > 
> > kernel test robot noticed the following build errors:
> 
> Ah, okay, this needs to be based on the series that adds HZ_PER_GHZ as it
> provides the needed header inclusion.

Thanks for the info, and sorry for the false report.

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-13 13:48       ` Philip Li
@ 2026-01-13 20:42         ` Andy Shevchenko
  2026-01-13 23:55           ` Philip Li
  0 siblings, 1 reply; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-13 20:42 UTC (permalink / raw)
  To: Philip Li
  Cc: kernel test robot, linux-i2c, linux-kernel, oe-kbuild-all,
	Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

On Tue, Jan 13, 2026 at 09:48:12PM +0800, Philip Li wrote:
> On Mon, Jan 12, 2026 at 10:36:49PM +0200, Andy Shevchenko wrote:
> > On Tue, Jan 13, 2026 at 04:33:04AM +0800, kernel test robot wrote:
> > > Hi Andy,
> > > 
> > > kernel test robot noticed the following build errors:
> > 
> > Ah, okay, this needs to be based on the series that adds HZ_PER_GHZ as it
> > provides the needed header inclusion.
> 
> Thanks for the info, and sorry for the false report.

No problem, can you remind the syntax on how I can mark the series that
LKP knows the dependency on another series (which is available only in
the mailing list)? I assume it needs message-id to the email thread?

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver
  2026-01-13 20:42         ` Andy Shevchenko
@ 2026-01-13 23:55           ` Philip Li
  0 siblings, 0 replies; 11+ messages in thread
From: Philip Li @ 2026-01-13 23:55 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: kernel test robot, linux-i2c, linux-kernel, oe-kbuild-all,
	Khalil Blaiech, Asmaa Mnebhi, Andi Shyti

On Tue, Jan 13, 2026 at 10:42:41PM +0200, Andy Shevchenko wrote:
> On Tue, Jan 13, 2026 at 09:48:12PM +0800, Philip Li wrote:
> > On Mon, Jan 12, 2026 at 10:36:49PM +0200, Andy Shevchenko wrote:
> > > On Tue, Jan 13, 2026 at 04:33:04AM +0800, kernel test robot wrote:
> > > > Hi Andy,
> > > > 
> > > > kernel test robot noticed the following build errors:
> > > 
> > > Ah, okay, this needs to be based on the series that adds HZ_PER_GHZ as it
> > > provides the needed header inclusion.
> > 
> > Thanks for the info, and sorry for the false report.
> 
> No problem, can you remind the syntax on how I can mark the series that
> LKP knows the dependency on another series (which is available only in
> the mailing list)? I assume it needs message-id to the email thread?

Currently to get dependency of another series is not supported yet, and
for now, we can only support the usage of '--base' option as documented
in [1] to avoid applying the patchset to wrong base.

Your suggestion is very helpful, probably we can check something like
base-message-id: (similar to base-commit:) to retrieve the dependency.

[1] https://git-scm.com/docs/git-format-patch#_base_tree_information

> 
> -- 
> With Best Regards,
> Andy Shevchenko
> 
> 

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups
  2026-01-12 13:55 [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andy Shevchenko
  2026-01-12 13:55 ` [PATCH v1 1/2] i2c: mlxbf: Remove unused bus speed definitions Andy Shevchenko
  2026-01-12 13:55 ` [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver Andy Shevchenko
@ 2026-01-14  7:36 ` Andi Shyti
  2026-01-14  8:24   ` Andy Shevchenko
  2 siblings, 1 reply; 11+ messages in thread
From: Andi Shyti @ 2026-01-14  7:36 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-i2c, linux-kernel, Khalil Blaiech, Asmaa Mnebhi

Hi Andy,

> Andy Shevchenko (2):
>   i2c: mlxbf: Remove unused bus speed definitions
>   i2c: mlxbf: Use HZ_PER_KHZ in the driver

merged to i2c/i2c-host.

Thanks,
Andi

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups
  2026-01-14  7:36 ` [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andi Shyti
@ 2026-01-14  8:24   ` Andy Shevchenko
  0 siblings, 0 replies; 11+ messages in thread
From: Andy Shevchenko @ 2026-01-14  8:24 UTC (permalink / raw)
  To: Andi Shyti; +Cc: linux-i2c, linux-kernel, Khalil Blaiech, Asmaa Mnebhi

On Wed, Jan 14, 2026 at 08:36:38AM +0100, Andi Shyti wrote:
> Hi Andy,
> 
> > Andy Shevchenko (2):
> >   i2c: mlxbf: Remove unused bus speed definitions
> >   i2c: mlxbf: Use HZ_PER_KHZ in the driver
> 
> merged to i2c/i2c-host.

Thank you!

-- 
With Best Regards,
Andy Shevchenko



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-01-14  8:24 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-12 13:55 [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andy Shevchenko
2026-01-12 13:55 ` [PATCH v1 1/2] i2c: mlxbf: Remove unused bus speed definitions Andy Shevchenko
2026-01-12 13:55 ` [PATCH v1 2/2] i2c: mlxbf: Use HZ_PER_KHZ in the driver Andy Shevchenko
2026-01-12 20:33   ` kernel test robot
2026-01-12 20:36     ` Andy Shevchenko
2026-01-13  7:30       ` Andy Shevchenko
2026-01-13 13:48       ` Philip Li
2026-01-13 20:42         ` Andy Shevchenko
2026-01-13 23:55           ` Philip Li
2026-01-14  7:36 ` [PATCH v1 0/2] i2c: mlxbf: A couple of cleanups Andi Shyti
2026-01-14  8:24   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox