The following issues were found

drivers/input/misc/powermate.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 77 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	int pulse_asleep;
	int pulse_awake;
	int requires_update; // physical settings which are out of sync
	char phys[64];
};

static char pm_name_powermate[] = "Griffin PowerMate";
static char pm_name_soundknob[] = "Griffin SoundKnob";


            

Reported by FlawFinder.

drivers/input/misc/tps65218-pwrbutton.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 53 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	struct regmap *regmap;
	struct input_dev *idev;
	const struct tps6521x_data *data;
	char phys[32];
};

static const struct of_device_id of_tps6521x_pb_match[] = {
	{ .compatible = "ti,tps65217-pwrbutton", .data = &tps65217_data },
	{ .compatible = "ti,tps65218-pwrbutton", .data = &tps65218_data },

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/dispnv50/ovly827e.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 72

              ovly827e_ntfy_wait_begun(struct nouveau_bo *bo, u32 offset,
			 struct nvif_device *device)
{
	s64 time = nvif_msec(device, 2000ULL,
		if (NVBO_TD32(bo, offset, NV_DISP_NOTIFICATION_1, _3, STATUS, ==, BEGUN))
			break;
		usleep_range(1, 2);
	);
	return time < 0 ? time : 0;

            

Reported by Cppcheck.

drivers/input/misc/xen-kbdfront.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 43 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              	int gref;
	int irq;
	struct xenbus_device *xbdev;
	char phys[32];
	/* current MT slot/contact ID we are injecting events in */
	int mtouch_cur_contact_id;
};

enum { KPARAM_X, KPARAM_Y, KPARAM_CNT };

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/dispnv50/curs507a.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 37

              bool
curs507a_space(struct nv50_wndw *wndw)
{
	nvif_msec(&nouveau_drm(wndw->plane.dev)->client.device, 100,
		if (NVIF_TV32(&wndw->wimm.base.user, NV507A, FREE, COUNT, >=, 4))
			return true;
	);

	WARN_ON(1);

            

Reported by Cppcheck.

drivers/gpu/drm/nouveau/dispnv50/crc.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 222

              	struct nouveau_drm *drm = nouveau_drm(dev);
	s64 ret;

	ret = nvif_msec(&drm->client.device, 50,
			if (func->ctx_finished(head, ctx)) break;);
	if (ret == -ETIMEDOUT)
		NV_ERROR(drm,
			 "CRC notifier ctx for head %d not finished after 50ms\n",
			 head->base.index);

            

Reported by Cppcheck.

drivers/gpu/drm/nouveau/dispnv50/corec37d.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 85

              corec37d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
			struct nvif_device *device)
{
	s64 time = nvif_msec(device, 2000ULL,
		if (NVBO_TD32(bo, offset, NV_DISP_NOTIFIER, _0, STATUS, ==, FINISHED))
			break;
		usleep_range(1, 2);
	);
	return time < 0 ? time : 0;

            

Reported by Cppcheck.

drivers/gpu/drm/nouveau/dispnv50/core907d.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 47

              	if (ret < 0)
		return ret;

	time = nvif_msec(core->chan.base.device, 2000ULL,
			 if (NVBO_TD32(bo, NV50_DISP_CORE_NTFY,
				       NV907D_CORE_NOTIFIER_3, CAPABILITIES_4, DONE, ==, TRUE))
				 break;
			 usleep_range(1, 2);
			 );

            

Reported by Cppcheck.

drivers/input/mouse/bcm5974.c
1 issues
char - Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues
Security

Line: 275 Column: 2 CWE codes: 119 120
Suggestion: Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length

              
/* logical device structure */
struct bcm5974 {
	char phys[64];
	struct usb_device *udev;	/* usb device */
	struct usb_interface *intf;	/* our interface */
	struct input_dev *input;	/* input dev */
	struct bcm5974_config cfg;	/* device configuration */
	struct mutex pm_mutex;		/* serialize access to open/suspend */

            

Reported by FlawFinder.

drivers/gpu/drm/nouveau/dispnv50/core507d.c
1 issues
There is an unknown macro here somewhere. Configuration is required. If nvif_msec is a macro then please configure it.
Error

Line: 65

              core507d_ntfy_wait_done(struct nouveau_bo *bo, u32 offset,
			struct nvif_device *device)
{
	s64 time = nvif_msec(device, 2000ULL,
		if (NVBO_TD32(bo, offset, NV_DISP_CORE_NOTIFIER_1, COMPLETION_0, DONE, ==, TRUE))
			break;
		usleep_range(1, 2);
	);
	return time < 0 ? time : 0;

            

Reported by Cppcheck.