Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1372163
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH net-next 2/3] net: dsa: make the FDB add function return void |
| Date | 2016-04-06 05:20 +0200 |
| Message-ID | <rkMaB-60f-7@gated-at.bofh.it> (permalink) |
| References | <rkB5w-5V6-11@gated-at.bofh.it> <rkB5w-5V6-9@gated-at.bofh.it> <rkJ34-3iX-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Hi Andrew, Andrew Lunn <andrew@lunn.ch> writes: >> mutex_lock(&ps->smi_mutex); >> - ret = _mv88e6xxx_port_fdb_load(ds, port, fdb->addr, fdb->vid, state); >> + if (_mv88e6xxx_port_fdb_load(ds, port, fdb->addr, fdb->vid, state)) >> + netdev_warn(ds->ports[port], "cannot load address\n"); > > In the SF2 driver you use pr_err, but here netdev_warn. We probably > should be consistent if we error or warn. I would use netdev_error, > since if this fails we probably have a real hardware problem. I used pr_err in the SF2 driver to be consistent with the rest of the code which only uses pr_err and pr_info. I was thinking about adding ds_err and ds_port_err to print errors for ds->master_dev and ds->ports[port], but that might be overkill. What do you think? Or local to the driver for the moment, like mvsw_err maybe? I tend to use warn for cases where the user cannot really do something about the situation, but an hardware problem is indeed critical, so I agree with you to use error over warn here. Thanks, Vivien
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH net-next 2/3] net: dsa: make the FDB add function return void Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-05 17:30 +0200
Re: [PATCH net-next 2/3] net: dsa: make the FDB add function return void Andrew Lunn <andrew@lunn.ch> - 2016-04-06 02:00 +0200
Re: [PATCH net-next 2/3] net: dsa: make the FDB add function return void Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-06 05:20 +0200
Re: [PATCH net-next 2/3] net: dsa: make the FDB add function return void Andrew Lunn <andrew@lunn.ch> - 2016-04-06 15:00 +0200
Re: [PATCH net-next 2/3] net: dsa: make the FDB add function return void Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2016-04-06 16:30 +0200
csiph-web