Re: [RFC 2/3] drm/i915: Prefer IS_GEN<n> check with bitmask.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 24, 2018 at 03:54:56PM +0100, Julia Lawall wrote:
> > I wish it would look something more like this:
> >
> > @@
> > identifier old	=~ "^INTEL_GEN$";
> > expression exp;
> > constant gen;
> > fresh identifier new = "IS_GEN" ## gen;
> > @@
> > - old(exp) == gen
> > + new(exp)
> >
> > But coccinelle doesn't seem to accept the constant in the fresh
> > identifier thing.
> 
> I think that the idea was to be sure that there would be no whitespace in
> the middle of the variable name.  But a constant should indeed be fine.  I
> can adjust that, in case it's useful in the future.

I think I had another similar case recently where I also wanted
a constant in there. Ah yes, now I remember. I was trying to
convert "n * 1024" to "SZ_nK" etc.

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux