dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* re: drm: sti: add DVO output connector
@ 2015-02-04  9:08 Dan Carpenter
  0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2015-02-04  9:08 UTC (permalink / raw)
  To: benjamin.gaignard; +Cc: Rasmus Villemoes, dri-devel

Hello Benjamin Gaignard,

The patch f32c4c506f9b: "drm: sti: add DVO output connector" from Dec
30, 2014, leads to the following static checker warning:

	drivers/gpu/drm/sti/sti_awg_utils.c:63 awg_generate_instr()
	warn: no-op. '(arg << 24) >> 24'

drivers/gpu/drm/sti/sti_awg_utils.c
    46                  switch (opcode) {
    47                  case SKIP:
    48                          /* leave 'arg' + 1 pixel elapsing without changing
    49                           * output bus */
    50                          arg--; /* pixel adjustment */
    51                          arg_tmp--;
    52  
    53                          if (arg < 0) {
    54                                  /* SKIP instruction not needed */
    55                                  return 0;
    56                          }
    57  
    58                          if (arg == 0) {
    59                                  /* SKIP 0 not permitted but we want to skip 1
    60                                   * pixel. So we transform SKIP into SET
    61                                   * instruction */
    62                                  opcode = SET;
    63                                  arg = (arg << 24) >> 24;
                                        ^^^^^^^^^^^^^^^^^^^^^^^^
    64                                  arg &= (0x0ff);
                                        ^^^^^^^^^^^^^^^
Since "arg" is zero then the shift/mask operations are a no-op.  I'm not
sure what was intented.

    65                                  break;
    66                          }
    67  
    68                          mux = 0;
    69                          data_enable = 0;
    70                          arg = (arg << 22) >> 22;
    71                          arg &= (0x3ff);
    72                          break;
    73                  case REPEAT:

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-04  9:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-04  9:08 drm: sti: add DVO output connector Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox