lkml.org 
[lkml]   [2014]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 01/24] input: Add ff-memless-next module
From
Date
On Tue, 2014-04-22 at 15:59 +0200, Michal Malý wrote:
> +/* Some devices might have a limit on how many uncombinable effects
> + * can be played at once */
> +static int mlnx_upload_conditional(struct mlnx_device *mlnxdev,
> + const struct ff_effect *effect)
> +{
> + struct mlnx_effect_command ecmd = {
> + .cmd = MLNX_UPLOAD_UNCOMB,
> + .u.uncomb.id = effect->id,
> + .u.uncomb.effect = effect
> + };
> + return mlnxdev->control_effect(mlnxdev->dev, mlnxdev->private,
> &ecmd);
> +}
> +

This mean you are building the structure on the stack

1. Are you sure nobody retains a reference?
2. That is needlessly inefficient

Regards
Oliver


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2014-04-23 14:41    [W:0.210 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site