Jing Xiangfeng
2020-Aug-03 03:48 UTC
[Nouveau] [PATCH] drm/nouveau/acr: fix a coding style in nvkm_acr_lsfw_load_bl_inst_data_sig()
This patch performs the following changes: 1. remove a redundant parentheses around the nvkm_acr_lsfw_add() calls 2. do assignment before this if condition, it is more readable Signed-off-by: Jing Xiangfeng <jingxiangfeng at huawei.com> --- drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c index 07d1830126ab..5f6006418472 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c @@ -191,7 +191,8 @@ nvkm_acr_lsfw_load_bl_inst_data_sig(struct nvkm_subdev *subdev, u32 *bldata; int ret; - if (IS_ERR((lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id)))) + lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id); + if (IS_ERR(lsfw)) return PTR_ERR(lsfw); ret = nvkm_firmware_load_name(subdev, path, "bl", ver, &bl); -- 2.17.1
Karol Herbst
2020-Aug-03 10:42 UTC
[Nouveau] [PATCH] drm/nouveau/acr: fix a coding style in nvkm_acr_lsfw_load_bl_inst_data_sig()
Reviewed-by: Karol Herbst <kherbst at redhat.com> On Mon, Aug 3, 2020 at 5:46 AM Jing Xiangfeng <jingxiangfeng at huawei.com> wrote:> > This patch performs the following changes: > 1. remove a redundant parentheses around the nvkm_acr_lsfw_add() calls > 2. do assignment before this if condition, it is more readable > > Signed-off-by: Jing Xiangfeng <jingxiangfeng at huawei.com> > --- > drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c > index 07d1830126ab..5f6006418472 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/acr/lsfw.c > @@ -191,7 +191,8 @@ nvkm_acr_lsfw_load_bl_inst_data_sig(struct nvkm_subdev *subdev, > u32 *bldata; > int ret; > > - if (IS_ERR((lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id)))) > + lsfw = nvkm_acr_lsfw_add(func, acr, falcon, id); > + if (IS_ERR(lsfw)) > return PTR_ERR(lsfw); > > ret = nvkm_firmware_load_name(subdev, path, "bl", ver, &bl); > -- > 2.17.1 > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/nouveau >
Seemingly Similar Threads
- [RESEND 06/15] drm/nouveau/nvkm/subdev/acr/lsfw: Remove unused variable 'loc'
- [PATCH] drm/nouveau/acr: remove unused loc variable
- [RESEND 00/15] Rid W=1 warnings from GPU
- [PATCH (set 1) 00/20] Rid W=1 warnings from GPU
- [PATCH] drm/nouveau/acr/ga102: remove set but unused variable