On Monday 27 February 2006 11:20, Denis Vlasenko wrote: > > Comments are welcome and I'll split the patch if needed. > > usb.c > ===== > #define BOGUS_SAFETY_PADDING 0x40 > > int > acxusb_s_issue_cmd_timeo( > acx_device_t *adev, > unsigned cmd, > void *buffer, > unsigned buflen, > unsigned timeout) > { > #if ACX_DEBUG > return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, timeout, __stringify(cmd)); > #else > return acx_s_issue_cmd_timeo_debug(adev, cmd, buffer, buflen, timeout); > #endif > } > > stringify what? We want symbolic command name, not it's numeric value. > stringifying must occur in .h file.
Missed that. The problem is that right now we need to reference the function. There's no real need for it, so I'll change it. > > > acx_func.h > ========== > #if ACX_DEBUG > > /* We want to log cmd names */ > int acxpci_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr); > int acxusb_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr); > static inline int > acx_s_issue_cmd_timeo_debug(acx_device_t *adev, unsigned cmd, void *param, unsigned len, unsigned timeout, const char* cmdstr) > { > if (IS_PCI(adev)) > return acxpci_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr); > return acxusb_s_issue_cmd_timeo_debug(adev, cmd, param, len, timeout, cmdstr); > } > int acx_s_issue_cmd(acx_device_t *adev, unsigned cmd, void *param, unsigned len); > > It will recurse: acx_s_issue_cmd_timeo_debug -> acxusb_s_issue_cmd_timeo_debug -> acx_s_issue_cmd_timeo_debug ->.... I forgot to remove that function. In acxusb_s_issue_timeo, it should call acxusb_s_issue_cmd_timeo_{debug,nodebug}, not the generic function. > Why do you need if (IS_PCI(adev)) at all? > > Please apply the attached style fixes on top of your patches. Will do. cmn -- Carlos Martín Nieto | http://www.cmartin.tk Hobbyist programmer | - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html