On 18-08-20, 01:47, Bard Liao wrote: > From: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> > > A Device may have at most 15 physical ports (DP0, DP1..DP14). > > Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@xxxxxxxxxxxxxxx> > Reviewed-by: Rander Wang <rander.wang@xxxxxxxxxxxxxxx> > Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@xxxxxxxxxxxxxxx> > Signed-off-by: Bard Liao <yung-chuan.liao@xxxxxxxxxxxxxxx> > --- > include/linux/soundwire/sdw.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h > index 76052f12c9f7..0aa4c6af7554 100644 > --- a/include/linux/soundwire/sdw.h > +++ b/include/linux/soundwire/sdw.h > @@ -38,7 +38,8 @@ struct sdw_slave; > #define SDW_FRAME_CTRL_BITS 48 > #define SDW_MAX_DEVICES 11 > > -#define SDW_VALID_PORT_RANGE(n) ((n) <= 14 && (n) >= 1) > +#define SDW_MAX_PORTS 15 > +#define SDW_VALID_PORT_RANGE(n) ((n) < SDW_MAX_PORTS && (n) >= 1) What is the use of this one if we are allocating all ports always, Also, I dont see it used in second patch? > > enum { > SDW_PORT_DIRN_SINK = 0, > -- > 2.17.1 -- ~Vinod