Hi Thierry,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.8-rc1 next-20200615]
[cannot apply to pwm/for-next]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    
https://github.com/0day-ci/linux/commits/Thierry-Reding/pwm-Miscellaneous-fixes-for-64-bit-support/20200615-221856
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
b3a9e3b9622ae10064826dccb4f7a52bd88c7407
config: h8300-randconfig-r004-20200615 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross 
ARCH=h8300 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>

All warnings (new ones prefixed by >>, old ones prefixed by <<):

In file included from include/linux/printk.h:404,
from include/linux/kernel.h:15,
from include/asm-generic/bug.h:19,
from arch/h8300/include/asm/bug.h:8,
from include/linux/bug.h:5,
from include/linux/thread_info.h:12,
from include/asm-generic/current.h:5,
from ./arch/h8300/include/generated/asm/current.h:1,
from include/linux/sched.h:12,
from include/linux/ratelimit.h:6,
from include/linux/dev_printk.h:16,
from include/linux/device.h:15,
from include/linux/backlight.h:12,
from drivers/video/fbdev/ssd1307fb.c:8:
drivers/video/fbdev/ssd1307fb.c: In function 'ssd1307fb_init':
>> drivers/video/fbdev/ssd1307fb.c:315:30: warning: format '%llu' expects 
>> argument of type 'long long unsigned int', but argument 5 has type 'unsigned 
>> int' [-Wformat=]
315 |   dev_dbg(&par->client->dev, "Using PWM%d with a %lluns period.n",
|                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dynamic_debug.h:125:15: note: in definition of macro 
'__dynamic_func_call'
125 |   func(&id, ##__VA_ARGS__);           |               ^~~~~~~~~~~
include/linux/dynamic_debug.h:157:2: note: in expansion of macro 
'_dynamic_func_call'
157 |  _dynamic_func_call(fmt,__dynamic_dev_dbg,            |  
^~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:2: note: in expansion of macro 'dynamic_dev_dbg'
115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|  ^~~~~~~~~~~~~~~
include/linux/dev_printk.h:115:23: note: in expansion of macro 'dev_fmt'
115 |  dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
|                       ^~~~~~~
drivers/video/fbdev/ssd1307fb.c:315:3: note: in expansion of macro 'dev_dbg'
315 |   dev_dbg(&par->client->dev, "Using PWM%d with a %lluns period.n",
|   ^~~~~~~
drivers/video/fbdev/ssd1307fb.c:315:53: note: format string is defined here
315 |   dev_dbg(&par->client->dev, "Using PWM%d with a %lluns period.n",
|                                                  ~~~^
|                                                     |
|                                                     long long unsigned int
|                                                  %u

vim +315 drivers/video/fbdev/ssd1307fb.c

   294  
   295  static int ssd1307fb_init(struct ssd1307fb_par *par)
   296  {
   297          struct pwm_state pwmstate;
   298          int ret;
   299          u32 precharge, dclk, com_invdir, compins;
   300  
   301          if (par->device_info->need_pwm) {
   302                  par->pwm = pwm_get(&par->client->dev, NULL);
   303                  if (IS_ERR(par->pwm)) {
   304                          dev_err(&par->client->dev, "Could not get PWM 
from device tree!\n");
   305                          return PTR_ERR(par->pwm);
   306                  }
   307  
   308                  pwm_init_state(par->pwm, &pwmstate);
   309                  pwm_set_relative_duty_cycle(&pwmstate, 50, 100);
   310                  pwm_apply_state(par->pwm, &pwmstate);
   311  
   312                  /* Enable the PWM */
   313                  pwm_enable(par->pwm);
   314  
 > 315                  dev_dbg(&par->client->dev, "Using PWM%d with a %lluns 
 > period.\n",
   316                          par->pwm->pwm, pwm_get_period(par->pwm));
   317          }
   318  
   319          /* Set initial contrast */
   320          ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CONTRAST);
   321          if (ret < 0)
   322                  return ret;
   323  
   324          ret = ssd1307fb_write_cmd(par->client, par->contrast);
   325          if (ret < 0)
   326                  return ret;
   327  
   328          /* Set segment re-map */
   329          if (par->seg_remap) {
   330                  ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SEG_REMAP_ON);
   331                  if (ret < 0)
   332                          return ret;
   333          }
   334  
   335          /* Set COM direction */
   336          com_invdir = 0xc0 | par->com_invdir << 3;
   337          ret = ssd1307fb_write_cmd(par->client,  com_invdir);
   338          if (ret < 0)
   339                  return ret;
   340  
   341          /* Set multiplex ratio value */
   342          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_MULTIPLEX_RATIO);
   343          if (ret < 0)
   344                  return ret;
   345  
   346          ret = ssd1307fb_write_cmd(par->client, par->height - 1);
   347          if (ret < 0)
   348                  return ret;
   349  
   350          /* set display offset value */
   351          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_DISPLAY_OFFSET);
   352          if (ret < 0)
   353                  return ret;
   354  
   355          ret = ssd1307fb_write_cmd(par->client, par->com_offset);
   356          if (ret < 0)
   357                  return ret;
   358  
   359          /* Set clock frequency */
   360          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_CLOCK_FREQ);
   361          if (ret < 0)
   362                  return ret;
   363  
   364          dclk = ((par->dclk_div - 1) & 0xf) | (par->dclk_frq & 0xf) << 4;
   365          ret = ssd1307fb_write_cmd(par->client, dclk);
   366          if (ret < 0)
   367                  return ret;
   368  
   369          /* Set Set Area Color Mode ON/OFF & Low Power Display Mode */
   370          if (par->area_color_enable || par->low_power) {
   371                  u32 mode;
   372  
   373                  ret = ssd1307fb_write_cmd(par->client,
   374                                            
SSD1307FB_SET_AREA_COLOR_MODE);
   375                  if (ret < 0)
   376                          return ret;
   377  
   378                  mode = (par->area_color_enable ? 0x30 : 0) |
   379                          (par->low_power ? 5 : 0);
   380                  ret = ssd1307fb_write_cmd(par->client, mode);
   381                  if (ret < 0)
   382                          return ret;
   383          }
   384  
   385          /* Set precharge period in number of ticks from the internal 
clock */
   386          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_PRECHARGE_PERIOD);
   387          if (ret < 0)
   388                  return ret;
   389  
   390          precharge = (par->prechargep1 & 0xf) | (par->prechargep2 & 0xf) 
<< 4;
   391          ret = ssd1307fb_write_cmd(par->client, precharge);
   392          if (ret < 0)
   393                  return ret;
   394  
   395          /* Set COM pins configuration */
   396          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_COM_PINS_CONFIG);
   397          if (ret < 0)
   398                  return ret;
   399  
   400          compins = 0x02 | !par->com_seq << 4 | par->com_lrremap << 5;
   401          ret = ssd1307fb_write_cmd(par->client, compins);
   402          if (ret < 0)
   403                  return ret;
   404  
   405          /* Set VCOMH */
   406          ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_VCOMH);
   407          if (ret < 0)
   408                  return ret;
   409  
   410          ret = ssd1307fb_write_cmd(par->client, par->vcomh);
   411          if (ret < 0)
   412                  return ret;
   413  
   414          /* Turn on the DC-DC Charge Pump */
   415          ret = ssd1307fb_write_cmd(par->client, SSD1307FB_CHARGE_PUMP);
   416          if (ret < 0)
   417                  return ret;
   418  
   419          ret = ssd1307fb_write_cmd(par->client,
   420                  BIT(4) | (par->device_info->need_chargepump ? BIT(2) : 
0));
   421          if (ret < 0)
   422                  return ret;
   423  
   424          /* Set lookup table */
   425          if (par->lookup_table_set) {
   426                  int i;
   427  
   428                  ret = ssd1307fb_write_cmd(par->client,
   429                                            SSD1307FB_SET_LOOKUP_TABLE);
   430                  if (ret < 0)
   431                          return ret;
   432  
   433                  for (i = 0; i < ARRAY_SIZE(par->lookup_table); ++i) {
   434                          u8 val = par->lookup_table[i];
   435  
   436                          if (val < 31 || val > 63)
   437                                  dev_warn(&par->client->dev,
   438                                           "lookup table index %d value 
out of range 31 <= %d <= 63\n",
   439                                           i, val);
   440                          ret = ssd1307fb_write_cmd(par->client, val);
   441                          if (ret < 0)
   442                                  return ret;
   443                  }
   444          }
   445  
   446          /* Switch to horizontal addressing mode */
   447          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_ADDRESS_MODE);
   448          if (ret < 0)
   449                  return ret;
   450  
   451          ret = ssd1307fb_write_cmd(par->client,
   452                                    
SSD1307FB_SET_ADDRESS_MODE_HORIZONTAL);
   453          if (ret < 0)
   454                  return ret;
   455  
   456          /* Set column range */
   457          ret = ssd1307fb_write_cmd(par->client, SSD1307FB_SET_COL_RANGE);
   458          if (ret < 0)
   459                  return ret;
   460  
   461          ret = ssd1307fb_write_cmd(par->client, 0x0);
   462          if (ret < 0)
   463                  return ret;
   464  
   465          ret = ssd1307fb_write_cmd(par->client, par->width - 1);
   466          if (ret < 0)
   467                  return ret;
   468  
   469          /* Set page range */
   470          ret = ssd1307fb_write_cmd(par->client, 
SSD1307FB_SET_PAGE_RANGE);
   471          if (ret < 0)
   472                  return ret;
   473  
   474          ret = ssd1307fb_write_cmd(par->client, par->page_offset);
   475          if (ret < 0)
   476                  return ret;
   477  
   478          ret = ssd1307fb_write_cmd(par->client,
   479                                    par->page_offset +
   480                                    DIV_ROUND_UP(par->height, 8) - 1);
   481          if (ret < 0)
   482                  return ret;
   483  
   484          /* Clear the screen */
   485          ssd1307fb_update_display(par);
   486  
   487          /* Turn on the display */
   488          ret = ssd1307fb_write_cmd(par->client, SSD1307FB_DISPLAY_ON);
   489          if (ret < 0)
   490                  return ret;
   491  
   492          return 0;
   493  }
   494  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]

Attachment: .config.gz
Description: application/gzip

Reply via email to