Skip to contentSkip to conversation

regmap: Separate regmap dev initialization

DISCUSSION Dan Carpenter 2 participants 4 messages Feb 18, 2014 Kernel janitors

lore
Share & tools
lore
#0 lore raw

Hello Michal Simek,

The patch 6cfec04bcc05: "regmap: Separate regmap dev initialization" from Feb 10, 2014, leads to the following static checker warning:

drivers/base/regmap/regmap.c:765 regmap_init()
warn: add curly braces?

drivers/base/regmap/regmap.c
759 ret = regcache_init(map, config);
760 if (ret != 0)
761 goto err_range;
762
763 if (dev)
764 ret = regmap_attach_dev(dev, map, config);
765 if (ret != 0)
766 goto err_regcache;

Please add curly braces or adjust the indenting to not confuse the static checkers.

767
768 return map;

regards,
dan carpenter

#1 lore raw

Hi Dan,

Quoted 18 lines · Dan Carpenter

Hello Michal Simek,

The patch 6cfec04bcc05: "regmap: Separate regmap dev initialization" from Feb 10, 2014, leads to the following static checker warning:

drivers/base/regmap/regmap.c:765 regmap_init()
warn: add curly braces?

drivers/base/regmap/regmap.c

   759          ret = regcache_init(map, config);
   760          if (ret != 0)
   761                  goto err_range;
   762  
   763          if (dev)
   764                  ret = regmap_attach_dev(dev, map, config);
   765                  if (ret != 0)
   766                          goto err_regcache;
Quoted 2 lines

Please add curly braces or adjust the indenting to not confuse the static checkers.

I am aware about this. Mark has already applied RFC to any his branch :-(. I can send v2 but it is up to Mark if he wants to fix it or not.

Thanks,
Michal

#2 lore raw
In reply to Dan Carpenter
Quoted 21 lines · Michal Simek

Hi Dan,

Quoted 18 lines · Dan Carpenter

Hello Michal Simek,

The patch 6cfec04bcc05: "regmap: Separate regmap dev initialization" from Feb 10, 2014, leads to the following static checker warning:

drivers/base/regmap/regmap.c:765 regmap_init()
warn: add curly braces?

drivers/base/regmap/regmap.c

   759          ret = regcache_init(map, config);
   760          if (ret != 0)
   761                  goto err_range;
   762  
   763          if (dev)
   764                  ret = regmap_attach_dev(dev, map, config);
   765                  if (ret != 0)
   766                          goto err_regcache;
Quoted 6 lines
Quoted 2 lines

Please add curly braces or adjust the indenting to not confuse the static checkers.

I am aware about this. Mark has already applied RFC to any his branch :-(. I can send v2 but it is up to Mark if he wants to fix it or not.

Oh, crap. Sorry, I reported this twice. I didn't mean to do that.

I normally grep my outbox to avoid this but I had a typo in my grep this time.

regards,
dan carpenter

#3 lore raw
In reply to Dan Carpenter
Quoted 25 lines · Dan Carpenter
Quoted 24 lines · Michal Simek

Hi Dan,

Quoted 20 lines · Dan Carpenter

Hello Michal Simek,

The patch 6cfec04bcc05: "regmap: Separate regmap dev initialization" from Feb 10, 2014, leads to the following static checker warning:

drivers/base/regmap/regmap.c:765 regmap_init()
warn: add curly braces?

drivers/base/regmap/regmap.c

   759          ret = regcache_init(map, config);
   760          if (ret != 0)
   761                  goto err_range;
   762  
   763          if (dev)
   764                  ret = regmap_attach_dev(dev, map, config);
   765                  if (ret != 0)
   766                          goto err_regcache;

Please add curly braces or adjust the indenting to not confuse the static checkers.

Quoted 8 lines
Quoted 3 lines

I am aware about this. Mark has already applied RFC to any his branch :-(. I can send v2 but it is up to Mark if he wants to fix it or not.

Oh, crap. Sorry, I reported this twice. I didn't mean to do that.

I normally grep my outbox to avoid this but I had a typo in my grep this time.

I didn't expect that Mark apply RFC too but it was probably good enough and we can fix this by one more patch. Feel free to submit it against
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git tags/nodev

Thanks,
Michal