lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1415800911.1761.21.camel@linux-0dmf.site>
Date:	Wed, 12 Nov 2014 15:01:51 +0100
From:	Oliver Neukum <oneukum@...e.de>
To:	Stephanie Wallick <stephanie.s.wallick@...el.com>
Cc:	linux-kernel@...r.kernel.org, gregkh@...uxfoundation.org,
	linux-usb@...r.kernel.org, devel@...verdev.osuosl.org,
	"Sean O. Stalley" <sean.stalley@...el.com>
Subject: Re: [V2 PATCH 04/10] added media agnostic (MA) USB packet handling

On Mon, 2014-11-10 at 18:09 -0800, Stephanie Wallick wrote:
> +/**
> + * Compares 2 request IDs. Returns true if a is less than b. Handles
> request id
> + * wraparound.
> + */
> +bool mausb_req_id_lt(u8 a, u8 b)

Unify such functions. It's just silly to have so many of them.

> +/**
> + * Calculates the total length of data contained in an ms_pkt (in
> bytes).
> + * Returns the length of the kvec, or 0 on an error.
> + */
> +static int mausb_ms_data_length(struct ms_pkt *pkt)
> +{
> +       int             i;
> +       int             total_length;
> +       struct kvec     *current_kvec;
> +
> +       for (i = 0; i < pkt->nents; ++i) {
> +               current_kvec = &pkt->kvec[i];
> +               if (NULL == current_kvec)
> +                       return -EINVAL;
> +               else
> +                       total_length += current_kvec->iov_len;
> +       }
> +
> +       return total_length;
> +}
> +

	Regards
		Oliver

-- 
Oliver Neukum <oneukum@...e.de>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ