Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [High] drm/xe/pcode: syntax error in pcode_try_request() due to misplaced parenthesis --
commit 3c7a166635d4e14258beaf50fb0fab91cf40aa3f Author: Alan Previn <[email protected]> drm/xe/pcode: Fix pcode_try_request polling delays This commit caps the exponential backoff delay in pcode_try_request() to 100ms and clamps the wait duration to the maximum allowed udelay value when polling in atomic context. > diff --git a/drivers/gpu/drm/xe/xe_pcode.c b/drivers/gpu/drm/xe/xe_pcode.c > index 266deecbb100a..d2ed5edf003e3 100644 > --- a/drivers/gpu/drm/xe/xe_pcode.c > +++ b/drivers/gpu/drm/xe/xe_pcode.c > @@ -146,6 +146,7 @@ int xe_pcode_read(struct xe_tile *tile, u32 mbox, u32 > *val0, u32 *val1) > return err; > } > > +#define __XE_PCODE_WAIT_MAX_BACKOFF_100MS (100 * USEC_PER_MSEC) > static int pcode_try_request(struct xe_tile *tile, u32 mbox, > u32 request, u32 reply_mask, u32 reply, > int *status, bool atomic, int timeout_us, bool > locked) > @@ -164,11 +165,14 @@ static int pcode_try_request(struct xe_tile *tile, u32 > mbox, > if ((*status == 0) && ((request & reply_mask) == reply)) > return 0; > > - if (atomic) > - udelay(wait); > - else > + wait = min_t(int, wait << 1, __XE_PCODE_WAIT_MAX_BACKOFF_100MS); > + if (atomic) { > + /* don't overflow udelay */ > + wait = min_t(int, wait, (MAX_UDELAY_MS * 1000); > + udelay(wait)); [Severity: High] Does this break compilation of drivers/gpu/drm/xe/xe_pcode.c? In the atomic branch of pcode_try_request(), the closing parenthesis for min_t() is missing before the semicolon and appears after udelay(wait) instead: wait = min_t(int, wait, (MAX_UDELAY_MS * 1000)); udelay(wait); -- Sashiko AI review ยท https://sashiko.dev/#/patchset/[email protected]?part=1
