Hi, I am inspecting the file nouveau.c... In the function nouveau_client_new there is the following: for (i = 0; i < nvdev->nr_client; i++) { but "nr_client" has no previous assignment so it has scrambled data. Is this expected behaviour or am I missing something (the most probable :)? And someone please tell me where do I find that ffs function. Thanks in advance!! -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20140326/8e571267/attachment.html>
struct nouveau_device_priv *nvdev = calloc(1, sizeof(*nvdev)); calloc sets the entire structure to 0. so that field is implicitly set to 0 on allocation. On Wed, Mar 26, 2014 at 4:37 PM, Daniel Melo Jorge da Cunha <dmjcunha at gmail.com> wrote:> Hi, I am inspecting the file nouveau.c... > In the function nouveau_client_new there is the > following: > > for (i = 0; i < nvdev->nr_client; i++) { > > but "nr_client" has no previous assignment > > so it has scrambled data. Is this expected behaviour > or am I missing something (the most probable :)? > > And someone please tell me where do I find that ffs function. > > Thanks in advance!! > > _______________________________________________ > Nouveau mailing list > Nouveau at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/nouveau >
On 03/26/2014 04:37 PM, Daniel Melo Jorge da Cunha wrote:> And someone please tell me where do I find that ffs function.ffs() is defined either by the arch (eg., arch/x86/include/asm/bitops.h) or, if not implemented by the arch, then generically in include/asm-generic/bitops/ffs.h This is common pattern for many arch-dependent implementation details. Regards, Peter Hurley
Maybe Matching Threads
- [PATCH] nouveau: safen up nouveau_device list usage against concurrent access
- [PATCH] libdrm/nouveau: safen up nouveau libdrm against concurrent access
- [PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
- [PATCH 2/2] nouveau: Do not add most bo's to the global bo list.
- [libdrm 01/13] nouveau: move more abi16-specific logic into abi16.c