Help with code

Can someone advise what does this do?

 #define write8inline(d) {                          \
   PORTD = (PORTD & B00000000) | ((d) & B11111111); \
   PORTB = (PORTB & B11111111) | ((d) & B00000000); \

I am trying to modify a library that originally used two ports (B 0...1) (D 2...7) (6+2) to transfer data to an LCD, but which I changed to use only PORTD by sacrificing the serial port. Currently PORTB is not used at all, but I cant remove the last line. Just want to check with someone with more experience if those two lines are doing something that could further be simplified.

Regards

but I cant remove the last line.

You have our permission.