+static int iuu_alloc_buf(struct iuu_private *priv) > +{ > + priv->buf = kzalloc(256, GFP_KERNEL); > + priv->dbgbuf = kzalloc(256, GFP_KERNEL); > + priv->writebuf = kzalloc(256, GFP_KERNEL); > + if (!priv->buf || !priv->dbgbuf || !priv->writebuf) { > + dbg("%s problem allocation buffer", __FUNCTION__); > + return -ENOMEM; > + } > + return 0; > +} >
Given they have the same lifetime what is wrong with simply putting them in struct iuu_private as arrays ? ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel