* [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line [not found] <tencent_0FA6AE16A21AAA2E9481C6FE598BA70CC405@qq.com> @ 2023-07-14 3:51 ` huzhi001 2023-07-14 5:14 ` huzhi001 ` (2 subsequent siblings) 3 siblings, 0 replies; 8+ messages in thread From: huzhi001 @ 2023-07-14 3:51 UTC (permalink / raw) To: bskeggs, kherbst, lyude, airlied, daniel; +Cc: dri-devel, nouveau, linux-kernel Fix Nineteen occurrences of the checkpatch.pl error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line [not found] <tencent_0FA6AE16A21AAA2E9481C6FE598BA70CC405@qq.com> 2023-07-14 3:51 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line huzhi001 @ 2023-07-14 5:14 ` huzhi001 [not found] ` <6f8d6649-5b53-4a44-8b9e-0ffd00af3fb6@app.fastmail.com> 2023-07-14 5:17 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: : trailing statements should be on next line huzhi001 2023-07-14 5:21 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: " huzhi001 3 siblings, 1 reply; 8+ messages in thread From: huzhi001 @ 2023-07-14 5:14 UTC (permalink / raw) To: bskeggs, kherbst, lyude, airlied, daniel; +Cc: dri-devel, nouveau, linux-kernel Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; ^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <6f8d6649-5b53-4a44-8b9e-0ffd00af3fb6@app.fastmail.com>]
* Re: [Nouveau] [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trail [not found] ` <6f8d6649-5b53-4a44-8b9e-0ffd00af3fb6@app.fastmail.com> @ 2023-07-25 6:10 ` Luna Jernberg 0 siblings, 0 replies; 8+ messages in thread From: Luna Jernberg @ 2023-07-25 6:10 UTC (permalink / raw) To: Mark Dymek, Luna Jernberg Cc: huzhi001, bskeggs, kherbst, lyude, airlied, daniel, nouveau, linux-kernel, dri-devel You can unsubscribe here: https://lists.freedesktop.org/mailman/listinfo/nouveau Den mån 24 juli 2023 kl 19:16 skrev Mark Dymek <mark@dymek.me>: > > not sure how i got signed up for this and i don’t see a way to unsubscribe. this is flooding my email with things i don’t care about. > > On Fri, Jul 14, 2023, at 1:14 AM, huzhi001@208suo.com wrote: > > Signed-off-by: ZhiHu <huzhi001@208suo.com> > --- > .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- > 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > index d8a4d773a58c..b99e0a7c96bb 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct > nvkm_cctx *cctx, struct nvkm_chan > u64 addr = 0ULL; > > switch (engn->engine->subdev.type) { > - case NVKM_ENGINE_SW : return; > - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; > - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; > - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; > - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; > - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; > - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; > - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; > - case NVKM_ENGINE_NVDEC : > + case NVKM_ENGINE_SW: > + return; > + case NVKM_ENGINE_GR: > + ptr0 = 0x0210; > + break; > + case NVKM_ENGINE_SEC: > + ptr0 = 0x0220; > + break; > + case NVKM_ENGINE_MSPDEC: > + ptr0 = 0x0250; > + break; > + case NVKM_ENGINE_MSPPP: > + ptr0 = 0x0260; > + break; > + case NVKM_ENGINE_MSVLD: > + ptr0 = 0x0270; > + break; > + case NVKM_ENGINE_VIC: > + ptr0 = 0x0280; break; > + case NVKM_ENGINE_MSENC: > + ptr0 = 0x0290; > + break; > + case NVKM_ENGINE_NVDEC: > ptr1 = 0x0270; > ptr0 = 0x0210; > break; > @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct > nvkm_memory *memory, u32 start, > int target; > > switch (nvkm_memory_target(memory)) { > - case NVKM_MEM_TARGET_VRAM: target = 0; break; > - case NVKM_MEM_TARGET_NCOH: target = 3; break; > + case NVKM_MEM_TARGET_VRAM: > + target = 0; > + break; > + case NVKM_MEM_TARGET_NCOH: > + target = 3; > + break; > default: > WARN_ON(1); > return; > ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: : trailing statements should be on next line [not found] <tencent_0FA6AE16A21AAA2E9481C6FE598BA70CC405@qq.com> 2023-07-14 3:51 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line huzhi001 2023-07-14 5:14 ` huzhi001 @ 2023-07-14 5:17 ` huzhi001 2023-07-14 5:21 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: " huzhi001 3 siblings, 0 replies; 8+ messages in thread From: huzhi001 @ 2023-07-14 5:17 UTC (permalink / raw) To: bskeggs, kherbst, lyude, airlied, daniel; +Cc: dri-devel, nouveau, linux-kernel Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line [not found] <tencent_0FA6AE16A21AAA2E9481C6FE598BA70CC405@qq.com> ` (2 preceding siblings ...) 2023-07-14 5:17 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: : trailing statements should be on next line huzhi001 @ 2023-07-14 5:21 ` huzhi001 2023-07-14 6:58 ` huzhi001 3 siblings, 1 reply; 8+ messages in thread From: huzhi001 @ 2023-07-14 5:21 UTC (permalink / raw) To: bskeggs, kherbst, lyude, airlied, daniel; +Cc: dri-devel, nouveau, linux-kernel Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line 2023-07-14 5:21 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: " huzhi001 @ 2023-07-14 6:58 ` huzhi001 2023-07-14 23:07 ` Lyude Paul 0 siblings, 1 reply; 8+ messages in thread From: huzhi001 @ 2023-07-14 6:58 UTC (permalink / raw) To: bskeggs, kherbst, lyude, airlied, daniel; +Cc: dri-devel, nouveau, linux-kernel [-- Attachment #1: Type: text/plain, Size: 2107 bytes --] Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; [-- Attachment #2: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c.eml --] [-- Type: message/rfc822, Size: 4776 bytes --] From: huzhi001@208suo.com To: bskeggs@redhat.com, kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line Date: Fri, 14 Jul 2023 11:51:25 +0800 Message-ID: <5c894d0a8a178628ca200d054004be3c@208suo.com> Fix Nineteen occurrences of the checkpatch.pl error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; [-- Attachment #3: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c_2.eml --] [-- Type: message/rfc822, Size: 3773 bytes --] From: huzhi001@208suo.com To: bskeggs@redhat.com, kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line Date: Fri, 14 Jul 2023 13:14:34 +0800 Message-ID: <f25017a660f8a3a4e49258a1d96003dc@208suo.com> Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; [-- Attachment #4: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c_3.eml --] [-- Type: message/rfc822, Size: 2913 bytes --] From: huzhi001@208suo.com To: bskeggs@redhat.com, kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: : trailing statements should be on next line Date: Fri, 14 Jul 2023 13:17:10 +0800 Message-ID: <2f4a7303e305d07fdd9c15a9dc95dc5f@208suo.com> Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; [-- Attachment #5: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c_4.eml --] [-- Type: message/rfc822, Size: 2862 bytes --] From: huzhi001@208suo.com To: bskeggs@redhat.com, kherbst@redhat.com, lyude@redhat.com, airlied@gmail.com, daniel@ffwll.ch Cc: dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line Date: Fri, 14 Jul 2023 13:21:22 +0800 Message-ID: <d0d767fb0dd3a9b7642559f379dbb0d6@208suo.com> Signed-off-by: ZhiHu <huzhi001@208suo.com> --- .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c index d8a4d773a58c..b99e0a7c96bb 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct nvkm_cctx *cctx, struct nvkm_chan u64 addr = 0ULL; switch (engn->engine->subdev.type) { - case NVKM_ENGINE_SW : return; - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; - case NVKM_ENGINE_NVDEC : + case NVKM_ENGINE_SW: + return; + case NVKM_ENGINE_GR: + ptr0 = 0x0210; + break; + case NVKM_ENGINE_SEC: + ptr0 = 0x0220; + break; + case NVKM_ENGINE_MSPDEC: + ptr0 = 0x0250; + break; + case NVKM_ENGINE_MSPPP: + ptr0 = 0x0260; + break; + case NVKM_ENGINE_MSVLD: + ptr0 = 0x0270; + break; + case NVKM_ENGINE_VIC: + ptr0 = 0x0280; break; + case NVKM_ENGINE_MSENC: + ptr0 = 0x0290; + break; + case NVKM_ENGINE_NVDEC: ptr1 = 0x0270; ptr0 = 0x0210; break; @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct nvkm_memory *memory, u32 start, int target; switch (nvkm_memory_target(memory)) { - case NVKM_MEM_TARGET_VRAM: target = 0; break; - case NVKM_MEM_TARGET_NCOH: target = 3; break; + case NVKM_MEM_TARGET_VRAM: + target = 0; + break; + case NVKM_MEM_TARGET_NCOH: + target = 3; + break; default: WARN_ON(1); return; ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line 2023-07-14 6:58 ` huzhi001 @ 2023-07-14 23:07 ` Lyude Paul 2023-07-15 9:23 ` Karol Herbst 0 siblings, 1 reply; 8+ messages in thread From: Lyude Paul @ 2023-07-14 23:07 UTC (permalink / raw) To: huzhi001, bskeggs, kherbst, airlied, daniel Cc: dri-devel, nouveau, linux-kernel NAK - checkpatch.pl is a (strongish) guideline, but not a rule. In the cases corrected in the patch series here, we format the switch cases on single lines as it dramatically improves the readability of what is otherwise just a /long/ list of slightly different static mappings. I don't believe we're the only part of the kernel to do this either. On Fri, 2023-07-14 at 14:58 +0800, huzhi001@208suo.com wrote: > Signed-off-by: ZhiHu <huzhi001@208suo.com> > --- > .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- > 1 file changed, 29 insertions(+), 11 deletions(-) > > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > index d8a4d773a58c..b99e0a7c96bb 100644 > --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct > nvkm_cctx *cctx, struct nvkm_chan > u64 addr = 0ULL; > > switch (engn->engine->subdev.type) { > - case NVKM_ENGINE_SW : return; > - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; > - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; > - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; > - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; > - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; > - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; > - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; > - case NVKM_ENGINE_NVDEC : > + case NVKM_ENGINE_SW: > + return; > + case NVKM_ENGINE_GR: > + ptr0 = 0x0210; > + break; > + case NVKM_ENGINE_SEC: > + ptr0 = 0x0220; > + break; > + case NVKM_ENGINE_MSPDEC: > + ptr0 = 0x0250; > + break; > + case NVKM_ENGINE_MSPPP: > + ptr0 = 0x0260; > + break; > + case NVKM_ENGINE_MSVLD: > + ptr0 = 0x0270; > + break; > + case NVKM_ENGINE_VIC: > + ptr0 = 0x0280; break; > + case NVKM_ENGINE_MSENC: > + ptr0 = 0x0290; > + break; > + case NVKM_ENGINE_NVDEC: > ptr1 = 0x0270; > ptr0 = 0x0210; > break; > @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct > nvkm_memory *memory, u32 start, > int target; > > switch (nvkm_memory_target(memory)) { > - case NVKM_MEM_TARGET_VRAM: target = 0; break; > - case NVKM_MEM_TARGET_NCOH: target = 3; break; > + case NVKM_MEM_TARGET_VRAM: > + target = 0; > + break; > + case NVKM_MEM_TARGET_NCOH: > + target = 3; > + break; This one isn't very long, but I'd still say it's definitely a lot easier to read in the compact form. If anything, the only change I would make here is formatting the default: case to be on a single line as well > default: > WARN_ON(1); > return; -- Cheers, Lyude Paul (she/her) Software Engineer at Red Hat ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: : trailing statements should be on next line 2023-07-14 23:07 ` Lyude Paul @ 2023-07-15 9:23 ` Karol Herbst 0 siblings, 0 replies; 8+ messages in thread From: Karol Herbst @ 2023-07-15 9:23 UTC (permalink / raw) To: Lyude Paul Cc: huzhi001, bskeggs, airlied, daniel, dri-devel, nouveau, linux-kernel On Sat, Jul 15, 2023 at 1:07 AM Lyude Paul <lyude@redhat.com> wrote: > > NAK - checkpatch.pl is a (strongish) guideline, but not a rule. In the cases > corrected in the patch series here, we format the switch cases on single lines > as it dramatically improves the readability of what is otherwise just a /long/ > list of slightly different static mappings. I don't believe we're the only > part of the kernel to do this either. > I wished there was a place to document something like "patches whose only reason is 'checkpatch.pl' said so" will be rejected. I think following some checkpatch rules are sane, but then the argument should be "makes code more clear" or "converts risky coding practises to less risky ones". Or do we have such a place? Maybe we should patch checkpatch.pl instead to throw a warning > On Fri, 2023-07-14 at 14:58 +0800, huzhi001@208suo.com wrote: > > Signed-off-by: ZhiHu <huzhi001@208suo.com> > > --- > > .../gpu/drm/nouveau/nvkm/engine/fifo/gk104.c | 40 ++++++++++++++----- > > 1 file changed, 29 insertions(+), 11 deletions(-) > > > > diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > > b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > > index d8a4d773a58c..b99e0a7c96bb 100644 > > --- a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > > +++ b/drivers/gpu/drm/nouveau/nvkm/engine/fifo/gk104.c > > @@ -137,15 +137,29 @@ gk104_ectx_bind(struct nvkm_engn *engn, struct > > nvkm_cctx *cctx, struct nvkm_chan > > u64 addr = 0ULL; > > > > switch (engn->engine->subdev.type) { > > - case NVKM_ENGINE_SW : return; > > - case NVKM_ENGINE_GR : ptr0 = 0x0210; break; > > - case NVKM_ENGINE_SEC : ptr0 = 0x0220; break; > > - case NVKM_ENGINE_MSPDEC: ptr0 = 0x0250; break; > > - case NVKM_ENGINE_MSPPP : ptr0 = 0x0260; break; > > - case NVKM_ENGINE_MSVLD : ptr0 = 0x0270; break; > > - case NVKM_ENGINE_VIC : ptr0 = 0x0280; break; > > - case NVKM_ENGINE_MSENC : ptr0 = 0x0290; break; > > - case NVKM_ENGINE_NVDEC : > > + case NVKM_ENGINE_SW: > > + return; > > + case NVKM_ENGINE_GR: > > + ptr0 = 0x0210; > > + break; > > + case NVKM_ENGINE_SEC: > > + ptr0 = 0x0220; > > + break; > > + case NVKM_ENGINE_MSPDEC: > > + ptr0 = 0x0250; > > + break; > > + case NVKM_ENGINE_MSPPP: > > + ptr0 = 0x0260; > > + break; > > + case NVKM_ENGINE_MSVLD: > > + ptr0 = 0x0270; > > + break; > > + case NVKM_ENGINE_VIC: > > + ptr0 = 0x0280; break; > > + case NVKM_ENGINE_MSENC: > > + ptr0 = 0x0290; > > + break; > > + case NVKM_ENGINE_NVDEC: > > ptr1 = 0x0270; > > ptr0 = 0x0210; > > break; > > @@ -435,8 +449,12 @@ gk104_runl_commit(struct nvkm_runl *runl, struct > > nvkm_memory *memory, u32 start, > > int target; > > > > switch (nvkm_memory_target(memory)) { > > - case NVKM_MEM_TARGET_VRAM: target = 0; break; > > - case NVKM_MEM_TARGET_NCOH: target = 3; break; > > + case NVKM_MEM_TARGET_VRAM: > > + target = 0; > > + break; > > + case NVKM_MEM_TARGET_NCOH: > > + target = 3; > > + break; > > This one isn't very long, but I'd still say it's definitely a lot easier to > read in the compact form. If anything, the only change I would make here is > formatting the default: case to be on a single line as well > > > default: > > WARN_ON(1); > > return; > > -- > Cheers, > Lyude Paul (she/her) > Software Engineer at Red Hat > ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-07-25 6:10 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_0FA6AE16A21AAA2E9481C6FE598BA70CC405@qq.com>
2023-07-14 3:51 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trailing s tatements should be on next line huzhi001
2023-07-14 5:14 ` huzhi001
[not found] ` <6f8d6649-5b53-4a44-8b9e-0ffd00af3fb6@app.fastmail.com>
2023-07-25 6:10 ` [Nouveau] [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxW) ERROR: trailing statements should be on next line ERROR: space prohibited before that ':' (ctx:WxE) ERROR: space prohibited before that ':' (ctx:WxE) ERROR: trailing statements should be on next line ERROR: trail Luna Jernberg
2023-07-14 5:17 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: ERROR: space prohibited before that ':' (ctx:WxW) ERROR: : trailing statements should be on next line huzhi001
2023-07-14 5:21 ` [PATCH] drm/nouveau/fifo:Fix Nineteen occurrences of the gk104.c error: " huzhi001
2023-07-14 6:58 ` huzhi001
2023-07-14 23:07 ` Lyude Paul
2023-07-15 9:23 ` Karol Herbst
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome