@@ -215,13 +215,13 @@ cnxk_gpio_parse_allowlist(struct cnxk_gpiochip *gpiochip, char *allowlist)
215215 errno = 0 ;
216216 val = strtol (token , NULL , 10 );
217217 if (errno ) {
218- RTE_LOG (ERR , PMD , "failed to parse %s\n " , token );
218+ CNXK_GPIO_LOG (ERR , "failed to parse %s" , token );
219219 ret = - errno ;
220220 goto out ;
221221 }
222222
223223 if (val < 0 || val >= gpiochip -> num_gpios ) {
224- RTE_LOG (ERR , PMD , "gpio%d out of 0-%d range\n " , val ,
224+ CNXK_GPIO_LOG (ERR , "gpio%d out of 0-%d range" , val ,
225225 gpiochip -> num_gpios - 1 );
226226 ret = - EINVAL ;
227227 goto out ;
@@ -231,7 +231,7 @@ cnxk_gpio_parse_allowlist(struct cnxk_gpiochip *gpiochip, char *allowlist)
231231 if (list [i ] != val )
232232 continue ;
233233
234- RTE_LOG (WARNING , PMD , "gpio%d already allowed\n " , val );
234+ CNXK_GPIO_LOG (WARNING , "gpio%d already allowed" , val );
235235 break ;
236236 }
237237 if (i == queue )
@@ -398,7 +398,7 @@ cnxk_gpio_queue_setup(struct rte_rawdev *dev, uint16_t queue_id,
398398 return ret ;
399399 }
400400 } else {
401- RTE_LOG (WARNING , PMD , "using existing gpio%d\n " , gpio -> num );
401+ CNXK_GPIO_LOG (WARNING , "using existing gpio%d" , gpio -> num );
402402 }
403403
404404 gpiochip -> gpios [num ] = gpio ;
@@ -647,7 +647,7 @@ cnxk_gpio_process_buf(struct cnxk_gpio *gpio, struct rte_rawdev_buf *rbuf)
647647
648648 /* get rid of last response if any */
649649 if (gpio -> rsp ) {
650- RTE_LOG (WARNING , PMD , "previous response got overwritten\n " );
650+ CNXK_GPIO_LOG (WARNING , "previous response got overwritten" );
651651 rte_free (gpio -> rsp );
652652 }
653653 gpio -> rsp = rsp ;
@@ -741,7 +741,7 @@ cnxk_gpio_probe(struct rte_vdev_device *dev)
741741 cnxk_gpio_format_name (name , sizeof (name ));
742742 rawdev = rte_rawdev_pmd_allocate (name , sizeof (* gpiochip ), rte_socket_id ());
743743 if (!rawdev ) {
744- RTE_LOG (ERR , PMD , "failed to allocate %s rawdev\n " , name );
744+ CNXK_GPIO_LOG (ERR , "failed to allocate %s rawdev" , name );
745745 return - ENOMEM ;
746746 }
747747
@@ -770,28 +770,28 @@ cnxk_gpio_probe(struct rte_vdev_device *dev)
770770 snprintf (buf , sizeof (buf ), "%s/gpiochip%d/base" , CNXK_GPIO_CLASS_PATH , gpiochip -> num );
771771 ret = cnxk_gpio_read_attr_int (buf , & gpiochip -> base );
772772 if (ret ) {
773- RTE_LOG (ERR , PMD , "failed to read %s\n " , buf );
773+ CNXK_GPIO_LOG (ERR , "failed to read %s" , buf );
774774 goto out ;
775775 }
776776
777777 /* read number of available gpios */
778778 snprintf (buf , sizeof (buf ), "%s/gpiochip%d/ngpio" , CNXK_GPIO_CLASS_PATH , gpiochip -> num );
779779 ret = cnxk_gpio_read_attr_int (buf , & gpiochip -> num_gpios );
780780 if (ret ) {
781- RTE_LOG (ERR , PMD , "failed to read %s\n " , buf );
781+ CNXK_GPIO_LOG (ERR , "failed to read %s" , buf );
782782 goto out ;
783783 }
784784 gpiochip -> num_queues = gpiochip -> num_gpios ;
785785
786786 ret = cnxk_gpio_parse_allowlist (gpiochip , params -> allowlist );
787787 if (ret ) {
788- RTE_LOG (ERR , PMD , "failed to parse allowed gpios\n " );
788+ CNXK_GPIO_LOG (ERR , "failed to parse allowed gpios" );
789789 goto out ;
790790 }
791791
792792 gpiochip -> gpios = rte_calloc (NULL , gpiochip -> num_gpios , sizeof (struct cnxk_gpio * ), 0 );
793793 if (!gpiochip -> gpios ) {
794- RTE_LOG (ERR , PMD , "failed to allocate gpios memory\n " );
794+ CNXK_GPIO_LOG (ERR , "failed to allocate gpios memory" );
795795 ret = - ENOMEM ;
796796 goto out ;
797797 }
@@ -851,3 +851,4 @@ RTE_PMD_REGISTER_VDEV(cnxk_gpio, cnxk_gpio_drv);
851851RTE_PMD_REGISTER_PARAM_STRING (cnxk_gpio ,
852852 "gpiochip=<int> "
853853 "allowlist=<list>" );
854+ RTE_LOG_REGISTER_SUFFIX (cnxk_logtype_gpio , gpio , INFO );
0 commit comments