Message ID | 20210723145600.282258-1-parav@nvidia.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 149ea30fdd5c28b89a3bfdecfc75cdab1deddb14 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net] devlink: Fix phys_port_name of virtual port and merge error | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Clearly marked for net |
netdev/subject_prefix | success | Link |
netdev/cc_maintainers | success | CCed 4 of 4 maintainers |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 1 this patch: 1 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | fail | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 26 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 1 this patch: 1 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net.git (refs/heads/master): On Fri, 23 Jul 2021 17:56:00 +0300 you wrote: > Merge commit cited in fixes tag was incorrect. Due to it phys_port_name > of the virtual port resulted in incorrect name. > > Also the phys_port_name of the physical port was written twice due to > the merge error. > > Fix it by removing the old code and inserting back the misplaced code. > > [...] Here is the summary with links: - [net] devlink: Fix phys_port_name of virtual port and merge error https://git.kernel.org/netdev/net/c/149ea30fdd5c You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/net/core/devlink.c b/net/core/devlink.c index 9f386d8e4828..302a185fbe4e 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -9343,18 +9343,10 @@ static int __devlink_port_phys_port_name_get(struct devlink_port *devlink_port, switch (attrs->flavour) { case DEVLINK_PORT_FLAVOUR_PHYSICAL: - case DEVLINK_PORT_FLAVOUR_VIRTUAL: n = snprintf(name, len, "p%u", attrs->phys.port_number); if (n < len && attrs->split) n += snprintf(name + n, len - n, "s%u", attrs->phys.split_subport_number); - if (!attrs->split) - n = snprintf(name, len, "p%u", attrs->phys.port_number); - else - n = snprintf(name, len, "p%us%u", - attrs->phys.port_number, - attrs->phys.split_subport_number); - break; case DEVLINK_PORT_FLAVOUR_CPU: case DEVLINK_PORT_FLAVOUR_DSA: @@ -9396,6 +9388,8 @@ static int __devlink_port_phys_port_name_get(struct devlink_port *devlink_port, n = snprintf(name, len, "pf%usf%u", attrs->pci_sf.pf, attrs->pci_sf.sf); break; + case DEVLINK_PORT_FLAVOUR_VIRTUAL: + return -EOPNOTSUPP; } if (n >= len)