All of lore.kernel.org
 help / color / mirror / Atom feed
* checkpatch error checking target arch in libvhost-user
@ 2020-05-18  1:37 Raphael Norwitz
       [not found] ` <CAJ+F1CKgxZPjm0C9mV8Y7S6vLY+m+6oTJpgJj3ieUuerGcDESQ@mail.gmail.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Raphael Norwitz @ 2020-05-18  1:37 UTC (permalink / raw)
  To: qemu-devel, marcandre.lureau; +Cc: marcandre.lureau, Raphael Norwitz

Hey Marc-Andre,

I'm working on a patchset with changes to libvhost-user. I'm hitting the
following checkpatch error:

Checking 0011-Lift-max-ram-slots-limit-in-libvhost-user.patch...
WARNING: architecture specific defines should be avoided
#117: FILE: contrib/libvhost-user/libvhost-user.h:38:
+#if defined(__i386__) || defined(__x86_64__) || \

total: 0 errors, 1 warnings, 120 lines checked

0011-Lift-max-ram-slots-limit-in-libvhost-user.patch has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.

I'm trying to set the maximum number of ram slots to the max supported by the
target architecture, and I don't know how to check that other than using these
macros. I see other architecture specific macro checks in libvhost-user.h,
such as here:
https://u16159052.ct.sendgrid.net/ls/click?upn=nHC8zHLUbSCl8801JuFxA5IdcFluFbhkOaN0W6nB6sLdfiznj-2FjAzM5FRqjRFWnMRnCWGbBIBOa9D0WJ4d1Dc3pvHvScsomf772bjiFIvKp8WAltnuQtFL02yD-2FAsRP43foG_E8SO-2FEypfU855L0ybQoiQY4Xaj8Z6NYzBoBK89OH-2BiJs2oVXUe9lHVA11uxF6eAFNBHYjrZ2L2x0rg8pxpJb7k58gV-2F0Pcs9b1FHGfiCxHVycMD52nL6rnjHYR0U2e5u-2Bb-2FDyF1ZIH76E5Zwe4Oe1vSdsfafOUWalRu1CMBhlsPO2TcpqiXnBFj1QaM1IrTe5RuhZMjTr5ZROvgb1i-2B74VaAbgKu-2FcfcA8Sk1-2BYxpqTTxs3x6f-2BYkMHAu-2BqEUJdY

Should I ignore this warning? If not, do you have any other suggestions?

Thanks,
Raphael


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: checkpatch error checking target arch in libvhost-user
       [not found] ` <CAJ+F1CKgxZPjm0C9mV8Y7S6vLY+m+6oTJpgJj3ieUuerGcDESQ@mail.gmail.com>
@ 2020-05-19  0:58   ` Raphael Norwitz
  0 siblings, 0 replies; 2+ messages in thread
From: Raphael Norwitz @ 2020-05-19  0:58 UTC (permalink / raw)
  To: Marc-André Lureau; +Cc: QEMU, Raphael Norwitz

> Can we make it a run-time value instead?

It's definitely possible, but will require a bit of refactoring. How
about for now I set a reasonable maximum which is supported by all
platforms (32)? That still increases it a lot from 8, and we can
figure out how best increase it even more for other target
architectures later.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-19  0:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-18  1:37 checkpatch error checking target arch in libvhost-user Raphael Norwitz
     [not found] ` <CAJ+F1CKgxZPjm0C9mV8Y7S6vLY+m+6oTJpgJj3ieUuerGcDESQ@mail.gmail.com>
2020-05-19  0:58   ` Raphael Norwitz

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.